diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-05-16 07:53:01 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-05-16 21:13:33 -0400 |
commit | 296838b182ebad919074bf324e1667d28a04b936 (patch) | |
tree | ccc240eac12af4ba244c15cb8fa105e073b9aa1f /fs/cifs/connect.c | |
parent | d06b5056ae160453c4be17e24e8cf08d65f4569f (diff) |
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: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 34186805e639..c49d49438c52 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1244,6 +1244,8 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1244 | char *string = NULL; | 1244 | char *string = NULL; |
1245 | char *tmp_end, *value; | 1245 | char *tmp_end, *value; |
1246 | char delim; | 1246 | char delim; |
1247 | bool cache_specified = false; | ||
1248 | static bool cache_warned = false; | ||
1247 | 1249 | ||
1248 | separator[0] = ','; | 1250 | separator[0] = ','; |
1249 | separator[1] = 0; | 1251 | separator[1] = 0; |
@@ -1455,6 +1457,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1455 | vol->seal = 1; | 1457 | vol->seal = 1; |
1456 | break; | 1458 | break; |
1457 | case Opt_direct: | 1459 | case Opt_direct: |
1460 | cache_specified = true; | ||
1458 | vol->direct_io = true; | 1461 | vol->direct_io = true; |
1459 | vol->strict_io = false; | 1462 | vol->strict_io = false; |
1460 | cERROR(1, "The \"directio\" option will be removed in " | 1463 | cERROR(1, "The \"directio\" option will be removed in " |
@@ -1462,6 +1465,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1462 | "option."); | 1465 | "option."); |
1463 | break; | 1466 | break; |
1464 | case Opt_strictcache: | 1467 | case Opt_strictcache: |
1468 | cache_specified = true; | ||
1465 | vol->direct_io = false; | 1469 | vol->direct_io = false; |
1466 | vol->strict_io = true; | 1470 | vol->strict_io = true; |
1467 | cERROR(1, "The \"strictcache\" option will be removed " | 1471 | cERROR(1, "The \"strictcache\" option will be removed " |
@@ -1888,6 +1892,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1888 | goto cifs_parse_mount_err; | 1892 | goto cifs_parse_mount_err; |
1889 | break; | 1893 | break; |
1890 | case Opt_cache: | 1894 | case Opt_cache: |
1895 | cache_specified = true; | ||
1891 | string = match_strdup(args); | 1896 | string = match_strdup(args); |
1892 | if (string == NULL) | 1897 | if (string == NULL) |
1893 | goto out_nomem; | 1898 | goto out_nomem; |
@@ -1938,6 +1943,14 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1938 | printk(KERN_NOTICE "CIFS: ignoring forcegid mount option " | 1943 | printk(KERN_NOTICE "CIFS: ignoring forcegid mount option " |
1939 | "specified with no gid= option.\n"); | 1944 | "specified with no gid= option.\n"); |
1940 | 1945 | ||
1946 | /* FIXME: remove this block in 3.7 */ | ||
1947 | if (!cache_specified && !cache_warned) { | ||
1948 | cache_warned = true; | ||
1949 | printk(KERN_NOTICE "CIFS: no cache= option specified, using " | ||
1950 | "\"cache=loose\". This default will change " | ||
1951 | "to \"cache=strict\" in 3.7.\n"); | ||
1952 | } | ||
1953 | |||
1941 | kfree(mountdata_copy); | 1954 | kfree(mountdata_copy); |
1942 | return 0; | 1955 | return 0; |
1943 | 1956 | ||