UBI: incorporate LEB offset information
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 14 Feb 2011 13:17:55 +0000 (15:17 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 8 Mar 2011 08:12:48 +0000 (10:12 +0200)
Incorporate the LEB offset information into UBIFS. We'll use this
information in one of the next patches to figure out what are the
max. write size offsets relative to the PEB. So this patch is just
a preparation.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
fs/ubifs/super.c
fs/ubifs/ubifs.h

index efc327b92f982bd4e2cc684b3571d4f664c68f8b..d4b4cb4596e2214fba4841950cc8fcbf05609d8c 100644 (file)
@@ -504,6 +504,7 @@ static int init_constants_early(struct ubifs_info *c)
 
        c->leb_cnt = c->vi.size;
        c->leb_size = c->vi.usable_leb_size;
+       c->leb_start = c->di.leb_start;
        c->half_leb_size = c->leb_size / 2;
        c->min_io_size = c->di.min_io_size;
        c->min_io_shift = fls(c->min_io_size) - 1;
index 8b519499f14af08b6e7d3d2e61d3e47bcfcc3d83..942c1d3cb0db50e8dd40bd0dbe3bbee310d09f6e 100644 (file)
@@ -1028,6 +1028,8 @@ struct ubifs_debug_info;
  *                  time (MTD write buffer size)
  * @max_write_shift: number of bits in @max_write_size minus one
  * @leb_size: logical eraseblock size in bytes
+ * @leb_start: starting offset of logical eraseblocks within physical
+ *             eraseblocks
  * @half_leb_size: half LEB size
  * @idx_leb_size: how many bytes of an LEB are effectively available when it is
  *                used to store indexing nodes (@leb_size - @max_idx_node_sz)
@@ -1276,6 +1278,7 @@ struct ubifs_info {
        int max_write_size;
        int max_write_shift;
        int leb_size;
+       int leb_start;
        int half_leb_size;
        int idx_leb_size;
        int leb_cnt;
This page took 0.038467 seconds and 5 git commands to generate.