aboutsummaryrefslogtreecommitdiff
path: root/include/linux/nilfs2_fs.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-04-30 18:56:12 +0900
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-05-10 22:21:44 +0900
commit6c6de1aa65189c37cc3c9af78da756c06a99899b (patch)
tree13f6d4a90d81357d581b80b8e400bd0b53b0a3e7 /include/linux/nilfs2_fs.h
parent1cb2d38cb3e59d58e8321a0592e84b5761afb063 (diff)
nilfs2: super root size should change depending on inode size
The size of super root structure depends on inode size, so NILFS_SR_BYTES macro should be a function of the inode size. This fixes the issue. Even though a different size value will be written for a possible future filesystem with extended inode, but fortunately this does not break disk format compatibility. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'include/linux/nilfs2_fs.h')
-rw-r--r--include/linux/nilfs2_fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h
index 8768c469e93e..bd8678f8a421 100644
--- a/include/linux/nilfs2_fs.h
+++ b/include/linux/nilfs2_fs.h
@@ -107,7 +107,7 @@ struct nilfs_super_root {
#define NILFS_SR_DAT_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 0)
#define NILFS_SR_CPFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 1)
#define NILFS_SR_SUFILE_OFFSET(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 2)
-#define NILFS_SR_BYTES (sizeof(struct nilfs_super_root))
+#define NILFS_SR_BYTES(inode_size) NILFS_SR_MDT_OFFSET(inode_size, 3)
/*
* Maximal mount counts