]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/staging/zram/zram_drv.h
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
[karo-tx-linux.git] / drivers / staging / zram / zram_drv.h
index fbe8ac98704cdcdb425516813248681d88178b8a..572c0b1551d4bb2dd6c0cb9940988a57ed40ebce 100644 (file)
  */
 static const unsigned max_num_devices = 32;
 
-/*
- * Stored at beginning of each compressed object.
- *
- * It stores back-reference to table entry which points to this
- * object. This is required to support memory defragmentation.
- */
-struct zobj_header {
-#if 0
-       u32 table_idx;
-#endif
-};
-
 /*-- Configurable parameters */
 
 /* Default zram disk size: 25% of total RAM */
@@ -68,9 +56,6 @@ static const size_t max_zpage_size = PAGE_SIZE / 4 * 3;
 
 /* Flags for zram pages (table[page_no].flags) */
 enum zram_pageflags {
-       /* Page is stored uncompressed */
-       ZRAM_UNCOMPRESSED,
-
        /* Page consists entirely of zeros */
        ZRAM_ZERO,
 
@@ -81,11 +66,11 @@ enum zram_pageflags {
 
 /* Allocated for each disk page */
 struct table {
-       void *handle;
+       unsigned long handle;
        u16 size;       /* object size (excluding header) */
        u8 count;       /* object ref count (not yet used) */
        u8 flags;
-} __attribute__((aligned(4)));
+} __aligned(4);
 
 struct zram_stats {
        u64 compr_size;         /* compressed size of pages stored */
@@ -98,7 +83,7 @@ struct zram_stats {
        u32 pages_zero;         /* no. of zero filled pages */
        u32 pages_stored;       /* no. of pages currently stored */
        u32 good_compress;      /* % of pages with compression ratio<=50% */
-       u32 pages_expand;       /* % of incompressible pages */
+       u32 bad_compress;       /* % of pages with compression ratio>=75% */
 };
 
 struct zram {