]> www.infradead.org Git - users/willy/xarray.git/commit
cifs: Add support for creating SFU symlinks
authorPali Rohár <pali@kernel.org>
Sun, 15 Sep 2024 19:45:42 +0000 (21:45 +0200)
committerSteve French <stfrench@microsoft.com>
Tue, 17 Sep 2024 01:10:34 +0000 (20:10 -0500)
commit41d3f256c6a5e41eb32b87168399c0facd512dc0
tree9dfc0c7b69143e56e22fa5a8e747e6be1505112b
parent21dcbc17eba3cc8283747bc77e864ac7596b95ff
cifs: Add support for creating SFU symlinks

Linux cifs client can already detect SFU symlinks and reads it content
(target location). But currently is not able to create new symlink. So
implement this missing support.

When 'sfu' mount option is specified and 'mfsymlinks' is not specified then
create new symlinks in SFU-style. This will provide full SFU compatibility
of symlinks when mounting cifs share with 'sfu' option. 'mfsymlinks' option
override SFU for better Apple compatibility as explained in fs_context.c
file in smb3_update_mnt_flags() function.

Extend __cifs_sfu_make_node() function, which now can handle also S_IFLNK
type and refactor structures passed to sync_write() in this function, by
splitting SFU type and SFU data from original combined struct win_dev as
combined fixed-length struct cannot be used for variable-length symlinks.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifspdu.h
fs/smb/client/cifsproto.h
fs/smb/client/fs_context.c
fs/smb/client/link.c
fs/smb/client/smb2ops.c