nilfs2: add blocksize member to nilfs object
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Sat, 22 May 2010 15:17:48 +0000 (00:17 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Fri, 23 Jul 2010 01:02:08 +0000 (10:02 +0900)
This stores blocksize in nilfs objects for the successive refactoring
of recovery logic.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/the_nilfs.c
fs/nilfs2/the_nilfs.h

index 8c1097327abc48ffd450789a524e80522940ed07..870a1273e9b0fa851c2b9d3cc9dbe91913d796b6 100644 (file)
@@ -604,6 +604,7 @@ int init_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi, char *data)
                           when reloading fails. */
        }
        nilfs->ns_blocksize_bits = sb->s_blocksize_bits;
+       nilfs->ns_blocksize = blocksize;
 
        err = nilfs_store_disk_layout(nilfs, sbp);
        if (err)
index 1ab974533697ea91609386da13e88c323ee8157e..85df47f0730fcf9a45d5a490fc95c65ea78dbf23 100644 (file)
@@ -82,6 +82,7 @@ enum {
  * @ns_gc_inodes: dummy inodes to keep live blocks
  * @ns_gc_inodes_h: hash list to keep dummy inode holding live blocks
  * @ns_blocksize_bits: bit length of block size
+ * @ns_blocksize: block size
  * @ns_nsegments: number of segments in filesystem
  * @ns_blocks_per_segment: number of blocks per segment
  * @ns_r_segments_percentage: reserved segments percentage
@@ -168,6 +169,7 @@ struct the_nilfs {
 
        /* Disk layout information (static) */
        unsigned int            ns_blocksize_bits;
+       unsigned int            ns_blocksize;
        unsigned long           ns_nsegments;
        unsigned long           ns_blocks_per_segment;
        unsigned long           ns_r_segments_percentage;