.d_revalidate = ll_revalidate_nd,
};
-static int client_common_fill_super(struct super_block *sb, char *md, char *dt)
+static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
+ struct vfsmount *mnt)
{
struct inode *root = 0;
struct ll_sb_info *sbi = ll_s2sbi(sb);
uuid = obd_get_uuid(sbi->ll_md_exp);
if (uuid != NULL)
sb->s_dev = get_uuid2int(uuid->uuid, strlen(uuid->uuid));
+ sbi->ll_mnt = mnt;
RETURN(err);
out_root:
#endif
}
-int ll_fill_super(struct super_block *sb)
+int ll_fill_super(struct super_block *sb, struct vfsmount *mnt)
{
struct lustre_profile *lprof;
struct lustre_sb_info *lsi = s2lsi(sb);
sprintf(md, "%s-%s", lprof->lp_md, ll_instance);
/* connections, registrations, sb setup */
- err = client_common_fill_super(sb, md, dt);
+ err = client_common_fill_super(sb, md, dt, mnt);
out_free:
if (md)
#include <lustre_disk.h>
#include <lustre_param.h>
-static int (*client_fill_super)(struct super_block *sb) = NULL;
+static int (*client_fill_super)(struct super_block *sb,
+ struct vfsmount *mnt) = NULL;
static void (*kill_super_cb)(struct super_block *sb) = NULL;
/*********** mount lookup *********/
cfs_block_sigs(blocked);
if (rc < 0) {
LCONSOLE_EMERG("Danger: interrupted umount %s with "
- "%d refs!\n",
- mnt->mnt_devname,
+ "%d refs!\n", mnt->mnt_devname,
atomic_read(&mnt->mnt_count));
break;
}
RETURN(-EINVAL);
}
+struct lustre_mount_data2 {
+ void *lmd2_data;
+ struct vfsmount *lmd2_mnt;
+};
/** This is the entry point for the mount call into Lustre.
* This is called when a server or client is mounted,
int lustre_fill_super(struct super_block *sb, void *data, int silent)
{
struct lustre_mount_data *lmd;
+ struct lustre_mount_data2 *lmd2 = data;
struct lustre_sb_info *lsi;
int rc;
ENTRY;
cfs_lockdep_off();
/* Figure out the lmd from the mount options */
- if (lmd_parse((char *)data, lmd)) {
+ if (lmd_parse((char *)(lmd2->lmd2_data), lmd)) {
lustre_put_lsi(sb);
GOTO(out, rc = -EINVAL);
}
}
/* Connect and start */
/* (should always be ll_fill_super) */
- rc = (*client_fill_super)(sb);
+ rc = (*client_fill_super)(sb, lmd2->lmd2_mnt);
/* c_f_s will call lustre_common_put_super on failure */
}
} else {
/* We can't call ll_fill_super by name because it lives in a module that
must be loaded after this one. */
-void lustre_register_client_fill_super(int (*cfs)(struct super_block *sb))
+void lustre_register_client_fill_super(int (*cfs)(struct super_block *sb,
+ struct vfsmount *mnt))
{
client_fill_super = cfs;
}
/***************** FS registration ******************/
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18))
-struct super_block * lustre_get_sb(struct file_system_type *fs_type,
- int flags, const char *devname, void * data)
+struct super_block * lustre_get_sb(struct file_system_type *fs_type, int flags,
+ const char *devname, void * data)
{
return get_sb_nodev(fs_type, flags, data, lustre_fill_super);
}
#else
-int lustre_get_sb(struct file_system_type *fs_type,
- int flags, const char *devname, void * data,
- struct vfsmount *mnt)
+int lustre_get_sb(struct file_system_type *fs_type, int flags,
+ const char *devname, void * data, struct vfsmount *mnt)
{
- return get_sb_nodev(fs_type, flags, data, lustre_fill_super, mnt);
+ struct lustre_mount_data2 lmd2 = {data, mnt};
+
+ return get_sb_nodev(fs_type, flags, &lmd2, lustre_fill_super, mnt);
}
#endif