@@ -538,8 +538,6 @@ struct ll_sb_info {
/* st_blksize returned by stat(2), when non-zero */
unsigned int ll_stat_blksize;
- __kernel_fsid_t ll_fsid;
-
struct kset ll_kset; /* sysfs object */
struct completion ll_kobj_unregister;
};
@@ -941,7 +939,6 @@ static inline ssize_t ll_lov_user_md_size(const struct lov_user_md *lum)
/* llite/llite_nfs.c */
extern const struct export_operations lustre_export_operations;
u32 get_uuid2int(const char *name, int len);
-void get_uuid2fsid(const char *name, int len, __kernel_fsid_t *fsid);
struct inode *search_inode_for_lustre(struct super_block *sb,
const struct lu_fid *fid);
int ll_dir_get_parent_fid(struct inode *dir, struct lu_fid *parent_fid);
@@ -591,10 +591,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
* only a node-local comparison.
*/
uuid = obd_get_uuid(sbi->ll_md_exp);
- if (uuid) {
+ if (uuid)
sb->s_dev = get_uuid2int(uuid->uuid, strlen(uuid->uuid));
- get_uuid2fsid(uuid->uuid, strlen(uuid->uuid), &sbi->ll_fsid);
- }
kfree(data);
kfree(osfs);
@@ -1775,6 +1773,7 @@ int ll_statfs(struct dentry *de, struct kstatfs *sfs)
{
struct super_block *sb = de->d_sb;
struct obd_statfs osfs;
+ u64 fsid = huge_encode_dev(sb->s_dev);
int rc;
CDEBUG(D_VFSTRACE, "VFS Op: at %llu jiffies\n", get_jiffies_64());
@@ -1805,7 +1804,8 @@ int ll_statfs(struct dentry *de, struct kstatfs *sfs)
sfs->f_blocks = osfs.os_blocks;
sfs->f_bfree = osfs.os_bfree;
sfs->f_bavail = osfs.os_bavail;
- sfs->f_fsid = ll_s2sbi(sb)->ll_fsid;
+ sfs->f_fsid.val[0] = (u32)fsid;
+ sfs->f_fsid.val[1] = (u32)(fsid >> 32);
return 0;
}
@@ -57,22 +57,6 @@ u32 get_uuid2int(const char *name, int len)
return (key0 << 1);
}
-void get_uuid2fsid(const char *name, int len, __kernel_fsid_t *fsid)
-{
- u64 key = 0, key0 = 0x12a3fe2d, key1 = 0x37abe8f9;
-
- while (len--) {
- key = key1 + (key0 ^ (*name++ * 7152373));
- if (key & 0x8000000000000000ULL)
- key -= 0x7fffffffffffffffULL;
- key1 = key0;
- key0 = key;
- }
-
- fsid->val[0] = key;
- fsid->val[1] = key >> 32;
-}
-
struct inode *search_inode_for_lustre(struct super_block *sb,
const struct lu_fid *fid)
{