scoutfs: add tot m/d device blocks to statfs_more

The total_{meta,data}_blocks scoutfs_super_block fields initialized by
mkfs aren't visible to userspace anywhere.  Add them to statfs_more so
that tools can get the totals (and use them for df, in this particular
case).

Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
Zach Brown
2020-10-26 15:19:03 -07:00
committed by Zach Brown
parent 2073a672a0
commit d589881855
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -857,6 +857,8 @@ static long scoutfs_ioc_statfs_more(struct file *file, unsigned long arg)
sizeof(struct scoutfs_ioctl_statfs_more));
sfm.fsid = le64_to_cpu(super->hdr.fsid);
sfm.rid = sbi->rid;
sfm.total_meta_blocks = le64_to_cpu(super->total_meta_blocks);
sfm.total_data_blocks = le64_to_cpu(super->total_data_blocks);
ret = scoutfs_client_get_last_seq(sb, &sfm.committed_seq);
if (ret)
+2
View File
@@ -369,6 +369,8 @@ struct scoutfs_ioctl_statfs_more {
__u64 fsid;
__u64 rid;
__u64 committed_seq;
__u64 total_meta_blocks;
__u64 total_data_blocks;
} __packed;
#define SCOUTFS_IOC_STATFS_MORE _IOR(SCOUTFS_IOCTL_MAGIC, 10, \