Skip to content

Commit 1e5f424

Browse files
Paulo Alcantarasmfrench
authored andcommitted
smb: client: return reparse type in /proc/mounts
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>
1 parent 8bd25b6 commit 1e5f424

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

fs/smb/client/cifsfs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root)
673673
seq_printf(s, ",backupgid=%u",
674674
from_kgid_munged(&init_user_ns,
675675
cifs_sb->ctx->backupgid));
676+
seq_show_option(s, "reparse",
677+
cifs_reparse_type_str(cifs_sb->ctx->reparse_type));
676678

677679
seq_printf(s, ",rsize=%u", cifs_sb->ctx->rsize);
678680
seq_printf(s, ",wsize=%u", cifs_sb->ctx->wsize);

fs/smb/client/cifsglob.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,18 @@ enum cifs_reparse_type {
159159
CIFS_REPARSE_TYPE_DEFAULT = CIFS_REPARSE_TYPE_NFS,
160160
};
161161

162+
static inline const char *cifs_reparse_type_str(enum cifs_reparse_type type)
163+
{
164+
switch (type) {
165+
case CIFS_REPARSE_TYPE_NFS:
166+
return "nfs";
167+
case CIFS_REPARSE_TYPE_WSL:
168+
return "wsl";
169+
default:
170+
return "unknown";
171+
}
172+
}
173+
162174
struct session_key {
163175
unsigned int len;
164176
char *response;

0 commit comments

Comments
 (0)