diff options
author | Coly Li <coly.li@suse.de> | 2009-04-02 16:59:39 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-04-02 19:05:09 -0700 |
commit | 054475d2af2640a6d6cb83b528512c7b49eef9ca (patch) | |
tree | 2790c3043ff7be3f45fdbdd129c4ab917dc7a191 /fs/minix | |
parent | 2430c4daf9e6cc6b144906a41f7f28c3f6ae5a2c (diff) | |
download | linux-054475d2af2640a6d6cb83b528512c7b49eef9ca.tar.bz2 |
fs/minix: return f_fsid for statfs(2)
Make minix file system return f_fsid info for statfs(2).
Signed-off-by: Coly Li <coly.li@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/minix')
-rw-r--r-- | fs/minix/inode.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/minix/inode.c b/fs/minix/inode.c index 618865b3128b..daad3c2740db 100644 --- a/fs/minix/inode.c +++ b/fs/minix/inode.c @@ -321,15 +321,20 @@ out: static int minix_statfs(struct dentry *dentry, struct kstatfs *buf) { - struct minix_sb_info *sbi = minix_sb(dentry->d_sb); - buf->f_type = dentry->d_sb->s_magic; - buf->f_bsize = dentry->d_sb->s_blocksize; + struct super_block *sb = dentry->d_sb; + struct minix_sb_info *sbi = minix_sb(sb); + u64 id = huge_encode_dev(sb->s_bdev->bd_dev); + buf->f_type = sb->s_magic; + buf->f_bsize = sb->s_blocksize; buf->f_blocks = (sbi->s_nzones - sbi->s_firstdatazone) << sbi->s_log_zone_size; buf->f_bfree = minix_count_free_blocks(sbi); buf->f_bavail = buf->f_bfree; buf->f_files = sbi->s_ninodes; buf->f_ffree = minix_count_free_inodes(sbi); buf->f_namelen = sbi->s_namelen; + buf->f_fsid.val[0] = (u32)id; + buf->f_fsid.val[1] = (u32)(id >> 32); + return 0; } |