We are supposed to disable mb_cache by default (bug 22771),
but we never did because it's not in default mount option.
This patch will add "no_mbcache" to default mount option.
Change-Id: I13c9db8e98ad305d26d887d8bd069eff92c20763
Signed-off-by: Liang Zhen <liang@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/373
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
char *options = NULL;
unsigned long page, s_flags;
struct page *__page;
char *options = NULL;
unsigned long page, s_flags;
struct page *__page;
memset(options, 0, CFS_PAGE_SIZE);
strncpy(options, ldd->ldd_mount_opts, CFS_PAGE_SIZE - 2);
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)) {
/* 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);
}
strncat(options, lmd->lmd_opts, len);
}