提交 296838b1 编写于 作者: J Jeff Layton 提交者: Steve French

cifs: add warning about change in default cache semantics in 3.7

Add a warning that will be displayed when there is no cache= option
specified. We want to ensure that users are aware of the change in
defaults coming in 3.7.
Reviewed-by: NPavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: NJeff Layton <jlayton@redhat.com>
上级 d06b5056
......@@ -1244,6 +1244,8 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
char *string = NULL;
char *tmp_end, *value;
char delim;
bool cache_specified = false;
static bool cache_warned = false;
separator[0] = ',';
separator[1] = 0;
......@@ -1455,6 +1457,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
vol->seal = 1;
break;
case Opt_direct:
cache_specified = true;
vol->direct_io = true;
vol->strict_io = false;
cERROR(1, "The \"directio\" option will be removed in "
......@@ -1462,6 +1465,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
"option.");
break;
case Opt_strictcache:
cache_specified = true;
vol->direct_io = false;
vol->strict_io = true;
cERROR(1, "The \"strictcache\" option will be removed "
......@@ -1888,6 +1892,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
goto cifs_parse_mount_err;
break;
case Opt_cache:
cache_specified = true;
string = match_strdup(args);
if (string == NULL)
goto out_nomem;
......@@ -1938,6 +1943,14 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
printk(KERN_NOTICE "CIFS: ignoring forcegid mount option "
"specified with no gid= option.\n");
/* FIXME: remove this block in 3.7 */
if (!cache_specified && !cache_warned) {
cache_warned = true;
printk(KERN_NOTICE "CIFS: no cache= option specified, using "
"\"cache=loose\". This default will change "
"to \"cache=strict\" in 3.7.\n");
}
kfree(mountdata_copy);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册