diff options
author | Paulo Alcantara <pc@manguebit.com> | 2023-11-26 05:55:03 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2024-01-08 00:46:05 +0300 |
commit | 102466f303ffcd5cff207b3c122557f73f1041e6 (patch) | |
tree | 3f6c69b86dbb4343870b24ea3a289823622835ae /fs/smb/client/smb2proto.h | |
parent | 3322960ce222997b1663ffa69e691b2edfec4ac9 (diff) | |
download | linux-102466f303ffcd5cff207b3c122557f73f1041e6.tar.xz |
smb: client: allow creating special files via reparse points
Add support for creating special files (e.g. char/block devices,
sockets, fifos) via NFS reparse points on SMB2+, which are fully
supported by most SMB servers and documented in MS-FSCC.
smb2_get_reparse_inode() creates the file with a corresponding reparse
point buffer set in @iov through a single roundtrip to the server.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311260746.HOJ039BV-lkp@intel.com/
Signed-off-by: Paulo Alcantara (SUSE) <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/smb/client/smb2proto.h')
-rw-r--r-- | fs/smb/client/smb2proto.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/smb/client/smb2proto.h b/fs/smb/client/smb2proto.h index 0e371f7e2854..709324cff712 100644 --- a/fs/smb/client/smb2proto.h +++ b/fs/smb/client/smb2proto.h @@ -56,6 +56,12 @@ extern int smb3_handle_read_data(struct TCP_Server_Info *server, extern int smb2_query_reparse_tag(const unsigned int xid, struct cifs_tcon *tcon, struct cifs_sb_info *cifs_sb, const char *path, __u32 *reparse_tag); +struct inode *smb2_get_reparse_inode(struct cifs_open_info_data *data, + struct super_block *sb, + const unsigned int xid, + struct cifs_tcon *tcon, + const char *full_path, + struct kvec *iov); int smb2_query_path_info(const unsigned int xid, struct cifs_tcon *tcon, struct cifs_sb_info *cifs_sb, @@ -289,4 +295,5 @@ int smb311_posix_query_path_info(const unsigned int xid, int posix_info_parse(const void *beg, const void *end, struct smb2_posix_info_parsed *out); int posix_info_sid_size(const void *beg, const void *end); + #endif /* _SMB2PROTO_H */ |