Whamcloud - gitweb
fix set/restore device id for avoid EMFILE error and mark lustre fs
authorshadow <shadow>
Thu, 26 Jul 2007 10:18:47 +0000 (10:18 +0000)
committershadow <shadow>
Thu, 26 Jul 2007 10:18:47 +0000 (10:18 +0000)
as FS_REQUIRES_DEV for avoid problems with generate fsid.

b=10786,9303
i=green
i=adilger

lustre/ChangeLog
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/super25.c
lustre/obdclass/obd_mount.c

index 62019bb..94e0da6 100644 (file)
@@ -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>
index 8c7e2b1..b5a4d54 100644 (file)
@@ -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)
index 6835b02..ef072e5 100644 (file)
@@ -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;
 }
 
index dc02592..f66826c 100644 (file)
@@ -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);
 }
 
index 79e0aa7..d04136f 100644 (file)
@@ -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