aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nilfs2_fs.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-04 10:19:32 -0500
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2011-03-08 00:58:31 -0500
commitbe667377a8b8cd73e1b923f33fb5be4034aa4bfa (patch)
tree8baee2f9155728331eeade85ec93547402f4e606 /include/linux/nilfs2_fs.h
parentae191838b0251d73b9d0a7254c6938406f5f6320 (diff)
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 {
216 * If there is a bit set in the incompatible feature set that the kernel 216 * If there is a bit set in the incompatible feature set that the kernel
217 * doesn't know about, it should refuse to mount the filesystem. 217 * doesn't know about, it should refuse to mount the filesystem.
218 */ 218 */
219#define NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT 0x00000001ULL
220
219#define NILFS_FEATURE_COMPAT_SUPP 0ULL 221#define NILFS_FEATURE_COMPAT_SUPP 0ULL
220#define NILFS_FEATURE_COMPAT_RO_SUPP 0ULL 222#define NILFS_FEATURE_COMPAT_RO_SUPP NILFS_FEATURE_COMPAT_RO_BLOCK_COUNT
221#define NILFS_FEATURE_INCOMPAT_SUPP 0ULL 223#define NILFS_FEATURE_INCOMPAT_SUPP 0ULL
222 224
223/* 225/*
@@ -509,7 +511,7 @@ struct nilfs_checkpoint {
509 __le64 cp_create; 511 __le64 cp_create;
510 __le64 cp_nblk_inc; 512 __le64 cp_nblk_inc;
511 __le64 cp_inodes_count; 513 __le64 cp_inodes_count;
512 __le64 cp_blocks_count; /* Reserved (might be deleted) */ 514 __le64 cp_blocks_count;
513 515
514 /* Do not change the byte offset of ifile inode. 516 /* Do not change the byte offset of ifile inode.
515 To keep the compatibility of the disk format, 517 To keep the compatibility of the disk format,