Skip to contentSkip to conversation

cifs: Display strictcache mount option in /proc/mounts

PATCH In review Sachin Prabhu 2 participants 5 messages Oct 11, 2011 – Oct 20, 2011 4 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs: Display strictcache mount option in /proc/mounts

Commit d39454ffe4a3c85428483b8a8a8e5e797b6363d5 adds a strictcache mount option. This patch allows the display of this mount option in /proc/mounts when listing shares mounted with the strictcache mount option.

fs/cifs/cifsfs.c +2 -0
index 54b8f1e..03d2f6b 100644
@@ -432,6 +432,8 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
 		seq_printf(s, ",mfsymlinks");
 	if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)
 		seq_printf(s, ",fsc");
+	if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO)
+		seq_printf(s, ",strictcache");
 
 	seq_printf(s, ",rsize=%d", cifs_sb->rsize);
 	seq_printf(s, ",wsize=%d", cifs_sb->wsize);
#2 lore raw
In reply to a message not in the archive

Looks reasonable - are we missing any more from the list of mount options that might matter to display?

Quoted 24 lines · Sachin Prabhu

Commit d39454ffe4a3c85428483b8a8a8e5e797b6363d5 adds a strictcache mount option. This patch allows the display of this mount option in /proc/mounts when listing shares mounted with the strictcache mount option.

fs/cifs/cifsfs.c +2 -0
index 54b8f1e..03d2f6b 100644
@@ -432,6 +432,8 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
                seq_printf(s, ",mfsymlinks");
        if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)
                seq_printf(s, ",fsc");
+       if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_STRICT_IO)
+               seq_printf(s, ",strictcache");
 
        seq_printf(s, ",rsize=%d", cifs_sb->rsize);
        seq_printf(s, ",wsize=%d", cifs_sb->wsize);
Signature · 3 lines
Thanks,

Steve
#4 lore raw
In reply to a message not in the archive
Quoted 3 lines · Steve French

Looks reasonable - are we missing any more from the list of mount options that might matter to display?

When comparing the options parsed in cifs_parse_mount_options() and ones shown in cifs_show_options(), there seems to be a few which are missing.

A quick list made by comparing the options parsed and displayed.. sign
nostrictsync/strictsync
noperm/perm
iocharset
locallease
netbiosname
noautotune
noblocksnd
nodfs
port
prefixpath
sec
servern
sockopt

Below is a simple patch which also includes the nostrictsync and noperm mount options.

Sachin Prabhu
--

Show nostrictsync and noperm mount options in /proc/mounts

Add support to print nostrictsync and noperm mount options in /proc/mounts for shares mounted with these options.

---
 fs/cifs/cifsfs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
fs/cifs/cifsfs.c +4 -0
index 54b8f1e..eb6e8bf 100644
@@ -432,6 +432,10 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
 		seq_printf(s, ",mfsymlinks");
 	if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)
 		seq_printf(s, ",fsc");
+	if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOSSYNC)
+		seq_printf(s, ",nostrictsync");
+	if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM)
+		seq_printf(s, ",noperm");
 
 	seq_printf(s, ",rsize=%d", cifs_sb->rsize);
 	seq_printf(s, ",wsize=%d", cifs_sb->wsize);
#6 lore raw
In reply to a message not in the archive
Quoted 44 lines · Sachin Prabhu
Quoted 3 lines · Steve French

Looks reasonable - are we missing any more from the list of mount options that might matter to display?

When comparing the options parsed in cifs_parse_mount_options() and ones shown in cifs_show_options(), there seems to be a few which are missing.

A quick list made by comparing the options parsed and displayed.. sign
nostrictsync/strictsync
noperm/perm
iocharset
locallease
netbiosname
noautotune
noblocksnd
nodfs
port
prefixpath
sec
servern
sockopt

Below is a simple patch which also includes the nostrictsync and noperm mount options.

Sachin Prabhu
--

Show nostrictsync and noperm mount options in /proc/mounts

Add support to print nostrictsync and noperm mount options in /proc/mounts for shares mounted with these options.

---
 fs/cifs/cifsfs.c |    4 ++++

 1 files changed, 4 insertions(+), 0 deletions(-)
fs/cifs/cifsfs.c +0 -0
index 54b8f1e..eb6e8bf 100644

fs/cifs/cifsfs.c cifs_show_options(struct seq_file *s, struct vfsmount *m) · line 441

Quoted 10 lines
fs/cifs/cifsfs.c +4 -0
@@ -432,6 +432,10 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
                seq_printf(s, ",mfsymlinks");
        if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)
                seq_printf(s, ",fsc");
+       if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOSSYNC)
+               seq_printf(s, ",nostrictsync");
+       if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM)
+               seq_printf(s, ",noperm");
 
        seq_printf(s, ",rsize=%d", cifs_sb->rsize);
        seq_printf(s, ",wsize=%d", cifs_sb->wsize);

I had to redo to avoid the merge conflict (your patch was not built on the previous one so conflicted with it) - but now merged.

Signature · 3 lines
Thanks,

Steve
#8 lore raw
In reply to a message not in the archive
Quoted 24 lines · Steve French
Quoted 24 lines

--

Show nostrictsync and noperm mount options in /proc/mounts

Add support to print nostrictsync and noperm mount options in /proc/mounts for shares mounted with these options.

---
 fs/cifs/cifsfs.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
fs/cifs/cifsfs.c +4 -0
index 54b8f1e..eb6e8bf 100644
@@ -432,6 +432,10 @@ cifs_show_options(struct seq_file *s, struct vfsmount *m)
               seq_printf(s, ",mfsymlinks");
       if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_FSCACHE)
               seq_printf(s, ",fsc");
+       if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOSSYNC)
+               seq_printf(s, ",nostrictsync");
+       if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM)
+               seq_printf(s, ",noperm");
 
Quoted 7 lines

fs/cifs/cifsfs.c cifs_show_options(struct seq_file *s, struct vfsmount *m) · line 441

Quoted 2 lines
fs/cifs/cifsfs.c +0 -0
       seq_printf(s, ",rsize=%d", cifs_sb->rsize);
       seq_printf(s, ",wsize=%d", cifs_sb->wsize);

I had to redo to avoid the merge conflict (your patch was not built on the previous one so conflicted with it) - but now merged.

Sorry about that. Thanks Steve.

Sachin Prabhu