]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/ubifs/super.c
UBIFS: introduce LEB overhead
[linux-2.6-omap-h63xx.git] / fs / ubifs / super.c
index 1018053519e64c64df4d7eb845a865672cd80aba..be23fd3cfd84eb6be7b60a1e48cf073d2b476a8c 100644 (file)
@@ -530,6 +530,12 @@ static int init_constants_early(struct ubifs_info *c)
        c->dead_wm = ALIGN(MIN_WRITE_SZ, c->min_io_size);
        c->dark_wm = ALIGN(UBIFS_MAX_NODE_SZ, c->min_io_size);
 
+       /*
+        * Calculate how many bytes would be wasted at the end of LEB if it was
+        * fully filled with data nodes of maximum size. This is used in
+        * calculations when reporting free space.
+        */
+       c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ;
        return 0;
 }