From 24bf8c39a51b3e34aa911c022c458d4677a8ff6a Mon Sep 17 00:00:00 2001 From: shadow <shadow> Date: Thu, 26 Jul 2007 10:18:47 +0000 Subject: [PATCH] fix set/restore device id for avoid EMFILE error and mark lustre fs as FS_REQUIRES_DEV for avoid problems with generate fsid. b=10786,9303 i=green i=adilger --- lustre/ChangeLog | 6 ++++++ lustre/llite/llite_internal.h | 3 +++ lustre/llite/llite_lib.c | 7 ++++--- lustre/llite/super25.c | 2 +- lustre/obdclass/obd_mount.c | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 62019bb6cb..94e0da6588 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -39,6 +39,12 @@ Bugzilla : 12771 Description: Update kernel patch for SLES10 SP1 Details : Add patch blkdev_tunables-2.6-sles10.patch to 2.6-sles10.series. +Severity : enhancement +Bugzilla : 10786/9303 +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. + -------------------------------------------------------------------------------- 2007-07-30 Cluster File Systems, Inc. <info@clusterfs.com> diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h index 8c7e2b18ee..b5a4d54534 100644 --- a/lustre/llite/llite_internal.h +++ b/lustre/llite/llite_internal.h @@ -257,6 +257,9 @@ struct ll_sb_info { 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) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 6835b02e9c..ef072e5051 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -239,7 +239,7 @@ static int client_common_fill_super(struct super_block *sb, if (data->ocd_connect_flags & OBD_CONNECT_JOIN) sbi->ll_flags |= LL_SBI_JOIN; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) + sbi->ll_sdev_orig = sb->s_dev; /* 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. */ @@ -247,8 +247,6 @@ static int client_common_fill_super(struct super_block *sb, * only a node-local comparison. */ sb->s_dev = get_uuid2int(sbi2mdc(sbi)->cl_target_uuid.uuid, strlen(sbi2mdc(sbi)->cl_target_uuid.uuid)); -#endif - obd = class_name2obd(osc); if (!obd) { CERROR("OSC %s: not setup or attached\n", osc); @@ -577,6 +575,9 @@ void client_common_put_super(struct super_block *sb) sbi->ll_mdc_exp = NULL; lustre_throw_orphan_dentries(sb); + /* restore s_dev from changed for clustred NFS*/ + sb->s_dev = sbi->ll_sdev_orig; + EXIT; } diff --git a/lustre/llite/super25.c b/lustre/llite/super25.c index dc02592d2d..f66826c746 100644 --- a/lustre/llite/super25.c +++ b/lustre/llite/super25.c @@ -154,7 +154,7 @@ static void __exit exit_lustre_lite(void) LASSERTF(rc == 0, "couldn't destroy ll_async_page slab\n"); } - if (proc_lustre_fs_root) + if (proc_lustre_fs_root) lprocfs_remove(&proc_lustre_fs_root); } diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c index 79e0aa7461..d04136f9be 100644 --- a/lustre/obdclass/obd_mount.c +++ b/lustre/obdclass/obd_mount.c @@ -1968,7 +1968,7 @@ struct file_system_type lustre_fs_type = { .name = "lustre", .get_sb = lustre_get_sb, .kill_sb = kill_anon_super, - .fs_flags = FS_BINARY_MOUNTDATA, + .fs_flags = FS_BINARY_MOUNTDATA | FS_REQUIRES_DEV, }; #else -- GitLab