aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-05-22 11:17:48 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-07-22 21:02:08 -0400
commit92c60ccaf3c15a06d859682b980de1066641b4d0 (patch)
tree9abc2b4ce0fa94e26e4708eedfd72546eec5a0e4
parentb37fa16e78d6f9790462b3181602a26b5af36260 (diff)
nilfs2: add blocksize member to nilfs object
This stores blocksize in nilfs objects for the successive refactoring of recovery logic. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
-rw-r--r--fs/nilfs2/the_nilfs.c1
-rw-r--r--fs/nilfs2/the_nilfs.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
index 8c1097327abc..870a1273e9b0 100644
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -604,6 +604,7 @@ int init_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi, char *data)
604 when reloading fails. */ 604 when reloading fails. */
605 } 605 }
606 nilfs->ns_blocksize_bits = sb->s_blocksize_bits; 606 nilfs->ns_blocksize_bits = sb->s_blocksize_bits;
607 nilfs->ns_blocksize = blocksize;
607 608
608 err = nilfs_store_disk_layout(nilfs, sbp); 609 err = nilfs_store_disk_layout(nilfs, sbp);
609 if (err) 610 if (err)
diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h
index 1ab974533697..85df47f0730f 100644
--- a/fs/nilfs2/the_nilfs.h
+++ b/fs/nilfs2/the_nilfs.h
@@ -82,6 +82,7 @@ enum {
82 * @ns_gc_inodes: dummy inodes to keep live blocks 82 * @ns_gc_inodes: dummy inodes to keep live blocks
83 * @ns_gc_inodes_h: hash list to keep dummy inode holding live blocks 83 * @ns_gc_inodes_h: hash list to keep dummy inode holding live blocks
84 * @ns_blocksize_bits: bit length of block size 84 * @ns_blocksize_bits: bit length of block size
85 * @ns_blocksize: block size
85 * @ns_nsegments: number of segments in filesystem 86 * @ns_nsegments: number of segments in filesystem
86 * @ns_blocks_per_segment: number of blocks per segment 87 * @ns_blocks_per_segment: number of blocks per segment
87 * @ns_r_segments_percentage: reserved segments percentage 88 * @ns_r_segments_percentage: reserved segments percentage
@@ -168,6 +169,7 @@ struct the_nilfs {
168 169
169 /* Disk layout information (static) */ 170 /* Disk layout information (static) */
170 unsigned int ns_blocksize_bits; 171 unsigned int ns_blocksize_bits;
172 unsigned int ns_blocksize;
171 unsigned long ns_nsegments; 173 unsigned long ns_nsegments;
172 unsigned long ns_blocks_per_segment; 174 unsigned long ns_blocks_per_segment;
173 unsigned long ns_r_segments_percentage; 175 unsigned long ns_r_segments_percentage;