Whamcloud - gitweb
LU-176 obdclass: disable mb_cache by default
[fs/lustre-release.git] / lustre / obdclass / obd_mount.c
index 6e18246..8c50cfb 100644 (file)
@@ -1409,6 +1409,7 @@ static struct vfsmount *server_kernel_mount(struct super_block *sb)
         char *options = NULL;
         unsigned long page, s_flags;
         struct page *__page;
+        int len;
         int rc;
         ENTRY;
 
@@ -1464,11 +1465,15 @@ static struct vfsmount *server_kernel_mount(struct super_block *sb)
         memset(options, 0, CFS_PAGE_SIZE);
         strncpy(options, ldd->ldd_mount_opts, CFS_PAGE_SIZE - 2);
 
+        len = CFS_PAGE_SIZE - strlen(options) - 2;
+        if (*options != 0)
+                strcat(options, ",");
+        strncat(options, "no_mbcache", len);
+
         /* Add in any mount-line options */
         if (lmd->lmd_opts && (*(lmd->lmd_opts) != 0)) {
-                int len = CFS_PAGE_SIZE - strlen(options) - 2;
-                if (*options != 0)
-                        strcat(options, ",");
+                len = CFS_PAGE_SIZE - strlen(options) - 2;
+                strcat(options, ",");
                 strncat(options, lmd->lmd_opts, len);
         }