diff options
author | Paulo Alcantara <pc@manguebit.com> | 2024-01-26 19:26:06 -0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-03-10 19:33:58 -0500 |
commit | 5a4b09ecf8e8ad26ea03a37e52e310fe13f15b49 (patch) | |
tree | 8f2538b6668b1941a40b21cd6104a75146b54360 /fs/smb/client/smb2inode.c | |
parent | fa792d8d235c20df5f422e4bd172db1efde55ab9 (diff) |
smb: client: add support for WSL reparse points
Add support for creating special files via WSL reparse points when
using 'reparse=wsl' mount option. They're faster than NFS reparse
points because they don't require extra roundtrips to figure out what
->d_type a specific dirent is as such information is already stored in
query dir responses and then making getdents() calls faster.
Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/smb2inode.c')
-rw-r--r-- | fs/smb/client/smb2inode.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/smb/client/smb2inode.c b/fs/smb/client/smb2inode.c index e869adb76189..4b25c660894c 100644 --- a/fs/smb/client/smb2inode.c +++ b/fs/smb/client/smb2inode.c @@ -1060,7 +1060,8 @@ struct inode *smb2_get_reparse_inode(struct cifs_open_info_data *data, const unsigned int xid, struct cifs_tcon *tcon, const char *full_path, - struct kvec *iov) + struct kvec *reparse_iov, + struct kvec *xattr_iov) { struct cifs_open_parms oparms; struct cifs_sb_info *cifs_sb = CIFS_SB(sb); @@ -1077,8 +1078,11 @@ struct inode *smb2_get_reparse_inode(struct cifs_open_info_data *data, FILE_CREATE, CREATE_NOT_DIR | OPEN_REPARSE_POINT, ACL_NO_MODE); + if (xattr_iov) + oparms.ea_cctx = xattr_iov; + cmds[0] = SMB2_OP_SET_REPARSE; - in_iov[0] = *iov; + in_iov[0] = *reparse_iov; in_iov[1].iov_base = data; in_iov[1].iov_len = sizeof(*data); |