diff options
author | Coly Li <coly.li@suse.de> | 2009-01-20 11:05:39 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2009-01-27 11:56:14 -0500 |
commit | b5c816a4f177604ae708892bba074b1d534fcbee (patch) | |
tree | 4b5aef6e9dfd4bc80db7b363b7aaa53580ea1e9a | |
parent | fec1878fe952b994125a3be7c94b1322db586f3b (diff) |
jfs: return f_fsid for statfs(2)
This patch makes jfs return f_fsid info for statfs(2). By Andreas'
suggestion, this patch populates a persistent f_fsid between boots/mounts
with help of on-disk uuid record.
Signed-off-by: Coly Li <coly.li@suse.de>
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
-rw-r--r-- | fs/jfs/super.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 0dae345e481b..59e07c10319d 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/posix_acl.h> | 29 | #include <linux/posix_acl.h> |
30 | #include <linux/buffer_head.h> | 30 | #include <linux/buffer_head.h> |
31 | #include <linux/exportfs.h> | 31 | #include <linux/exportfs.h> |
32 | #include <linux/crc32.h> | ||
32 | #include <asm/uaccess.h> | 33 | #include <asm/uaccess.h> |
33 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
34 | 35 | ||
@@ -168,6 +169,9 @@ static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
168 | buf->f_files = maxinodes; | 169 | buf->f_files = maxinodes; |
169 | buf->f_ffree = maxinodes - (atomic_read(&imap->im_numinos) - | 170 | buf->f_ffree = maxinodes - (atomic_read(&imap->im_numinos) - |
170 | atomic_read(&imap->im_numfree)); | 171 | atomic_read(&imap->im_numfree)); |
172 | buf->f_fsid.val[0] = (u32)crc32_le(0, sbi->uuid, sizeof(sbi->uuid)/2); | ||
173 | buf->f_fsid.val[1] = (u32)crc32_le(0, sbi->uuid + sizeof(sbi->uuid)/2, | ||
174 | sizeof(sbi->uuid)/2); | ||
171 | 175 | ||
172 | buf->f_namelen = JFS_NAME_MAX; | 176 | buf->f_namelen = JFS_NAME_MAX; |
173 | return 0; | 177 | return 0; |