]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ubifs/super.c
UBIFS: use bit-fields to store compression type
[linux-2.6-omap-h63xx.git] / fs / ubifs / super.c
index d80b2aef42b661001b2c87ac645f9a8ac29fbfd7..21b4103271ecf836f1e98a5aaaf23db7ba851058 100644 (file)
@@ -2020,6 +2020,14 @@ static int __init ubifs_init(void)
        BUILD_BUG_ON(UBIFS_INO_NODE_SZ != 160);
        BUILD_BUG_ON(UBIFS_REF_NODE_SZ != 64);
 
+       /*
+        * We use 2 bit wide bit-fields to store compression type, which should
+        * be amended if more compressors are added. The bit-fields are:
+        * @compr_type in 'struct ubifs_inode' and @default_compr in
+        * 'struct ubifs_info'.
+        */
+       BUILD_BUG_ON(UBIFS_COMPR_TYPES_CNT > 4);
+
        /*
         * We require that PAGE_CACHE_SIZE is greater-than-or-equal-to
         * UBIFS_BLOCK_SIZE. It is assumed that both are powers of 2.