From: Pekka Enberg Update ext4_statfs to return an FSID that is a 64 bit XOR of the 128 bit filesystem UUID as suggested by Andreas Dilger. See the following Bugzilla entry for details: http://bugzilla.kernel.org/show_bug.cgi?id=136 Cc: Andreas Dilger Cc: Stephen Tweedie Signed-off-by: Pekka Enberg Signed-off-by: Andrew Morton --- fs/ext4/super.c | 5 +++++ 1 files changed, 5 insertions(+) diff -puN fs/ext4/super.c~ext4-fsid-for-statvfs fs/ext4/super.c --- a/fs/ext4/super.c~ext4-fsid-for-statvfs +++ a/fs/ext4/super.c @@ -2460,6 +2460,7 @@ static int ext4_statfs (struct dentry * struct ext4_super_block *es = sbi->s_es; ext4_fsblk_t overhead; int i; + u64 fsid; if (test_opt (sb, MINIX_DF)) overhead = 0; @@ -2506,6 +2507,10 @@ static int ext4_statfs (struct dentry * buf->f_files = le32_to_cpu(es->s_inodes_count); buf->f_ffree = percpu_counter_sum(&sbi->s_freeinodes_counter); buf->f_namelen = EXT4_NAME_LEN; + fsid = le64_to_cpup((void *)es->s_uuid) ^ + le64_to_cpup((void *)es->s_uuid + sizeof(u64)); + buf->f_fsid.val[0] = fsid & 0xFFFFFFFFUL; + buf->f_fsid.val[1] = (fsid >> 32) & 0xFFFFFFFFUL; return 0; } _