Description: Kernel patches update for RHEL5 2.6.18-8.1.10.el5.
Details : Modify the target file & which_kernel.
+Severity : enhancement
+Bugzilla : 10786
+Description: omit set fsid for export NFS
+Details : fix set/restore device id for avoid EMFILE error and mark lustre fs
+ as FS_REQUIRES_DEV for avoid problems with generate fsid.
+
+Severity : normal
+Bugzilla : 13304
+Frequency : Always, for kernels after 2.6.16
+Description: Fix warning idr_remove called for id=.. which is not
+ allocated.
+Details : Last kernels save old s_dev before kill super and not allow
+ to restore from callback - restore it before call kill_anon_super.
+
--------------------------------------------------------------------------------
2007-08-10 Cluster File Systems, Inc. <info@clusterfs.com>
/* obd_mount.c */
void lustre_register_client_fill_super(int (*cfs)(struct super_block *sb));
+void lustre_register_kill_super_cb(void (*cfs)(struct super_block *sb));
+
+
int lustre_common_put_super(struct super_block *sb);
int lustre_process_log(struct super_block *sb, char *logname,
struct config_llog_instance *cfg);
enum stats_track_type ll_stats_track_type;
int ll_stats_track_id;
int ll_rw_stats_on;
+ dev_t ll_sdev_orig; /* save s_dev before assign for clustred nfs*/
};
#define LL_DEFAULT_MAX_RW_CHUNK (32 * 1024 * 1024)
void ll_lli_init(struct ll_inode_info *lli);
int ll_fill_super(struct super_block *sb);
void ll_put_super(struct super_block *sb);
+void ll_kill_super(struct super_block *sb);
struct inode *ll_inode_from_lock(struct ldlm_lock *lock);
void ll_clear_inode(struct inode *inode);
int ll_setattr_raw(struct inode *inode, struct iattr *attr);
sbi->ll_flags |= LL_SBI_OSS_CAPA;
}
+ sbi->ll_sdev_orig = sb->s_dev;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
/* We set sb->s_dev equal on all lustre clients in order to support
* NFS export clustering. NFSD requires that the FSID be the same
* on all clients. */
/* s_dev is also used in lt_compare() to compare two fs, but that is
* only a node-local comparison. */
-
+
/* XXX: this will not work with LMV */
sb->s_dev = get_uuid2int(sbi2mdc(sbi)->cl_target_uuid.uuid,
strlen(sbi2mdc(sbi)->cl_target_uuid.uuid));
prune_deathrow(sbi, 0);
list_del(&sbi->ll_conn_chain);
-
+
obd_fid_fini(sbi->ll_dt_exp);
obd_disconnect(sbi->ll_dt_exp);
sbi->ll_dt_exp = NULL;
sbi->ll_md_exp = NULL;
lustre_throw_orphan_dentries(sb);
+
+ EXIT;
+}
+
+void ll_kill_super(struct super_block *sb)
+{
+ struct ll_sb_info *sbi;
+
+ ENTRY;
+
+ /* not init sb ?*/
+ if (!(sb->s_flags & MS_ACTIVE))
+ return;
+
+ sbi = ll_s2sbi(sb);
+ /* we need restore s_dev from changed for clustred NFS before put_super
+ * because new kernels have cached s_dev and change sb->s_dev in
+ * put_super not affected real removing devices */
+ if (sbi)
+ sb->s_dev = sbi->ll_sdev_orig;
EXIT;
}
ll_register_cache(&ll_cache_definition);
lustre_register_client_fill_super(ll_fill_super);
+ lustre_register_kill_super_cb(ll_kill_super);
+
lustre_register_client_process_config(ll_process_config);
ll_get_random_bytes(seed, sizeof(seed));
capa_count[CAPA_SITE_CLIENT]);
lustre_register_client_fill_super(NULL);
+ lustre_register_kill_super_cb(NULL);
+
lustre_register_client_process_config(NULL);
ll_unregister_cache(&ll_cache_definition);
#include <lustre_param.h>
static int (*client_fill_super)(struct super_block *sb) = NULL;
+static void (*kill_super_cb)(struct super_block *sb) = NULL;
/*********** mount lookup *********/
client_fill_super = cfs;
}
+void lustre_register_kill_super_cb(void (*cfs)(struct super_block *sb))
+{
+ kill_super_cb = cfs;
+}
+
/***************** FS registration ******************/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
}
#endif
+void lustre_kill_super(struct super_block *sb)
+{
+ struct lustre_sb_info *lsi = s2lsi(sb);
+
+ if (kill_super_cb && lsi &&(lsi->lsi_flags & LSI_SERVER))
+ (*kill_super_cb)(sb);
+
+ kill_anon_super(sb);
+}
+
struct file_system_type lustre_fs_type = {
.owner = THIS_MODULE,
.name = "lustre",
.get_sb = lustre_get_sb,
- .kill_sb = kill_anon_super,
- .fs_flags = FS_BINARY_MOUNTDATA,
+ .kill_sb = lustre_kill_super,
+ .fs_flags = FS_BINARY_MOUNTDATA | FS_REQUIRES_DEV,
};
#else
}
EXPORT_SYMBOL(lustre_register_client_fill_super);
+EXPORT_SYMBOL(lustre_register_kill_super_cb);
EXPORT_SYMBOL(lustre_common_put_super);
EXPORT_SYMBOL(lustre_process_log);
EXPORT_SYMBOL(lustre_end_log);