summaryrefslogtreecommitdiffstats
path: root/include/linux/nilfs2_fs.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-05 00:19:32 +0900
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-08 14:58:31 +0900
commitbe667377a8b8cd73e1b923f33fb5be4034aa4bfa (patch)
tree8baee2f9155728331eeade85ec93547402f4e606 /include/linux/nilfs2_fs.h
parentae191838b0251d73b9d0a7254c6938406f5f6320 (diff)
downloadlinux-be667377a8b8cd73e1b923f33fb5be4034aa4bfa.tar.gz
linux-be667377a8b8cd73e1b923f33fb5be4034aa4bfa.tar.bz2
linux-be667377a8b8cd73e1b923f33fb5be4034aa4bfa.zip
nilfs2: record used amount of each checkpoint in checkpoint list
This records the number of used blocks per checkpoint in each checkpoint entry of cpfile. Even though userland tools can get the block count via nilfs_get_cpinfo ioctl, it was not updated by the nilfs2 kernel code. This fixes the issue and makes it available for userland tools to calculate used amount per checkpoint. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Cc: Jiro SEKIBA <jir@unicus.jp>
Diffstat (limited to 'include/linux/nilfs2_fs.h')
-rw-r--r--include/linux/nilfs2_fs.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h
index 3a65e5aa2d76..ae33ac2db62d 100644
--- a/include/linux/nilfs2_fs.h
+++ b/include/linux/nilfs2_fs.h
@@ -216,8 +216,10 @@ struct nilfs_super_block {
* If there is a bit set in the incompatible feature set that the kernel
* doesn't know about, it should refuse to mount the filesystem.
*/
+#define NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT 0x00000001ULL
+
#define NILFS_FEATURE_COMPAT_SUPP 0ULL
-#define NILFS_FEATURE_COMPAT_RO_SUPP 0ULL
+#define NILFS_FEATURE_COMPAT_RO_SUPP NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT
#define NILFS_FEATURE_INCOMPAT_SUPP 0ULL
/*
@@ -509,7 +511,7 @@ struct nilfs_checkpoint {
__le64 cp_create;
__le64 cp_nblk_inc;
__le64 cp_inodes_count;
- __le64 cp_blocks_count; /* Reserved (might be deleted) */
+ __le64 cp_blocks_count;
/* Do not change the byte offset of ifile inode.
To keep the compatibility of the disk format,