Skip to content

Commit 197e671

Browse files
Coly Litorvalds
authored andcommitted
fs/omfs: return f_fsid for statfs(2)
Make omfs return f_fsid info for statfs(2). Signed-off-by: Coly Li <coly.li@suse.de> Acked-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 054475d commit 197e671

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎fs/omfs/inode.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,14 +262,19 @@ static int omfs_statfs(struct dentry *dentry, struct kstatfs *buf)
262262
{
263263
struct super_block *s = dentry->d_sb;
264264
struct omfs_sb_info *sbi = OMFS_SB(s);
265+
u64 id = huge_encode_dev(s->s_bdev->bd_dev);
266+
265267
buf->f_type = OMFS_MAGIC;
266268
buf->f_bsize = sbi->s_blocksize;
267269
buf->f_blocks = sbi->s_num_blocks;
268270
buf->f_files = sbi->s_num_blocks;
269271
buf->f_namelen = OMFS_NAMELEN;
272+
buf->f_fsid.val[0] = (u32)id;
273+
buf->f_fsid.val[1] = (u32)(id >> 32);
270274

271275
buf->f_bfree = buf->f_bavail = buf->f_ffree =
272276
omfs_count_free(s);
277+
273278
return 0;
274279
}
275280

0 commit comments

Comments
 (0)