]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
smb: client: return reparse type in /proc/mounts
authorPaulo Alcantara <pc@manguebit.com>
Sat, 24 Feb 2024 19:57:14 +0000 (16:57 -0300)
committerSteve French <stfrench@microsoft.com>
Mon, 11 Mar 2024 00:33:58 +0000 (19:33 -0500)
Add support for returning reparse mount option in /proc/mounts.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402262152.YZOwDlCM-lkp@intel.com/
Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsfs.c
fs/smb/client/cifsglob.h

index 62c4d54b301e21e29acb385fca71f91785a9bb45..1bfd1b4c41d9c66567b101ef4c0d7f1d689cdbf7 100644 (file)
@@ -673,6 +673,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
                seq_printf(s, ",backupgid=%u",
                           from_kgid_munged(&init_user_ns,
                                            cifs_sb->ctx->backupgid));
+       seq_show_option(s, "reparse",
+                       cifs_reparse_type_str(cifs_sb->ctx->reparse_type));
 
        seq_printf(s, ",rsize=%u", cifs_sb->ctx->rsize);
        seq_printf(s, ",wsize=%u", cifs_sb->ctx->wsize);
index 3afae8bf476d881981b8b87557ba5f7df536af25..a0506a45eae39f9c42429b545e03d0c19ca6e65e 100644 (file)
@@ -159,6 +159,18 @@ enum cifs_reparse_type {
        CIFS_REPARSE_TYPE_DEFAULT = CIFS_REPARSE_TYPE_NFS,
 };
 
+static inline const char *cifs_reparse_type_str(enum cifs_reparse_type type)
+{
+       switch (type) {
+       case CIFS_REPARSE_TYPE_NFS:
+               return "nfs";
+       case CIFS_REPARSE_TYPE_WSL:
+               return "wsl";
+       default:
+               return "unknown";
+       }
+}
+
 struct session_key {
        unsigned int len;
        char *response;