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 20:13:33 -0500 |
commit | d06b5056ae160453c4be17e24e8cf08d65f4569f (patch) | |
tree | 3442bcdbf5167850ce7671370b7f3d00599dfa6c /fs/cifs/cifsfs.c | |
parent | 09983b2fab80fa037b1dcf9a11de5a70df59ef7f (diff) | |
download | linux-d06b5056ae160453c4be17e24e8cf08d65f4569f.tar.gz linux-d06b5056ae160453c4be17e24e8cf08d65f4569f.tar.bz2 linux-d06b5056ae160453c4be17e24e8cf08d65f4569f.zip |
cifs: display cache= option in /proc/mounts
...and deprecate the display of strictcache, forcedirectio, and fsc
as separate options.
Reviewed-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-rw-r--r-- | fs/cifs/cifsfs.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index c45f170c28d0..f718d5780062 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c @@ -328,6 +328,19 @@ cifs_show_security(struct seq_file *s, struct TCP_Server_Info *server) seq_printf(s, "i"); } +static void +cifs_show_cache_flavor(struct seq_file *s, struct cifs_sb_info *cifs_sb) +{ + seq_printf(s, ",cache="); + + if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) + seq_printf(s, "strict"); + else if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) + seq_printf(s, "none"); + else + seq_printf(s, "loose"); +} + /* * cifs_show_options() is for displaying mount options in /proc/mounts. * Not all settable options are displayed but most of the important @@ -342,6 +355,7 @@ cifs_show_options(struct seq_file *s, struct dentry *root) srcaddr = (struct sockaddr *)&tcon->ses->server->srcaddr; cifs_show_security(s, tcon->ses->server); + cifs_show_cache_flavor(s, cifs_sb); seq_printf(s, ",unc=%s", tcon->treeName); @@ -407,8 +421,6 @@ cifs_show_options(struct seq_file *s, struct dentry *root) seq_printf(s, ",rwpidforward"); if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) seq_printf(s, ",forcemand"); - if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_DIRECT_IO) - seq_printf(s, ",directio"); if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_XATTR) seq_printf(s, ",nouser_xattr"); if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR) @@ -431,8 +443,6 @@ cifs_show_options(struct seq_file *s, struct dentry *root) seq_printf(s, ",nostrictsync"); if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) seq_printf(s, ",noperm"); - if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO) - seq_printf(s, ",strictcache"); if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_BACKUPUID) seq_printf(s, ",backupuid=%u", cifs_sb->mnt_backupuid); if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_CIFS_BACKUPGID) |