Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c306af23 authored by Ryusuke Konishi's avatar Ryusuke Konishi
Browse files

nilfs2: return f_fsid for statfs2



This follows the change of Coly Li's series ("fs: return f_fsid for
statfs(2)"), and make nilfs2 return f_fsid info for statfs(2).

Acked-by: default avatarColy Li <coly.li@suse.de>
Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
parent b0cbc861
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -476,11 +476,12 @@ static int nilfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
{
	struct super_block *sb = dentry->d_sb;
	struct super_block *sb = dentry->d_sb;
	struct nilfs_sb_info *sbi = NILFS_SB(sb);
	struct nilfs_sb_info *sbi = NILFS_SB(sb);
	struct the_nilfs *nilfs = sbi->s_nilfs;
	u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
	unsigned long long blocks;
	unsigned long long blocks;
	unsigned long overhead;
	unsigned long overhead;
	unsigned long nrsvblocks;
	unsigned long nrsvblocks;
	sector_t nfreeblocks;
	sector_t nfreeblocks;
	struct the_nilfs *nilfs = sbi->s_nilfs;
	int err;
	int err;


	/*
	/*
@@ -514,6 +515,9 @@ static int nilfs_statfs(struct dentry *dentry, struct kstatfs *buf)
	buf->f_files = atomic_read(&sbi->s_inodes_count);
	buf->f_files = atomic_read(&sbi->s_inodes_count);
	buf->f_ffree = 0; /* nilfs_count_free_inodes(sb); */
	buf->f_ffree = 0; /* nilfs_count_free_inodes(sb); */
	buf->f_namelen = NILFS_NAME_LEN;
	buf->f_namelen = NILFS_NAME_LEN;
	buf->f_fsid.val[0] = (u32)id;
	buf->f_fsid.val[1] = (u32)(id >> 32);

	return 0;
	return 0;
}
}