Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

smb: move list of FileSystemAttributes to common/fscc.h

These definitions are exactly the same on both client and server,
so move them to new common header file.

Signed-off-by: ChenXiaoSong <chenxiaosong@kylinos.cn>
Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

ChenXiaoSong and committed by
Steve French
84d8d4cf d8ac9879

+44 -54
+1
fs/smb/client/cifsglob.h
··· 26 26 #include <uapi/linux/cifs/cifs_mount.h> 27 27 #include "../common/smbglob.h" 28 28 #include "../common/smb2pdu.h" 29 + #include "../common/fscc.h" 29 30 #include "smb2pdu.h" 30 31 #include <linux/filelock.h> 31 32
-27
fs/smb/client/cifspdu.h
··· 2100 2100 /* minimum includes first three fields, and empty FS Name */ 2101 2101 #define MIN_FS_ATTR_INFO_SIZE 12 2102 2102 2103 - 2104 - /* List of FileSystemAttributes - see 2.5.1 of MS-FSCC */ 2105 - #define FILE_SUPPORTS_SPARSE_VDL 0x10000000 /* faster nonsparse extend */ 2106 - #define FILE_SUPPORTS_BLOCK_REFCOUNTING 0x08000000 /* allow ioctl dup extents */ 2107 - #define FILE_SUPPORT_INTEGRITY_STREAMS 0x04000000 2108 - #define FILE_SUPPORTS_USN_JOURNAL 0x02000000 2109 - #define FILE_SUPPORTS_OPEN_BY_FILE_ID 0x01000000 2110 - #define FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000 2111 - #define FILE_SUPPORTS_HARD_LINKS 0x00400000 2112 - #define FILE_SUPPORTS_TRANSACTIONS 0x00200000 2113 - #define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000 2114 - #define FILE_READ_ONLY_VOLUME 0x00080000 2115 - #define FILE_NAMED_STREAMS 0x00040000 2116 - #define FILE_SUPPORTS_ENCRYPTION 0x00020000 2117 - #define FILE_SUPPORTS_OBJECT_IDS 0x00010000 2118 - #define FILE_VOLUME_IS_COMPRESSED 0x00008000 2119 - #define FILE_SUPPORTS_POSIX_UNLINK_RENAME 0x00000400 2120 - #define FILE_RETURNS_CLEANUP_RESULT_INFO 0x00000200 2121 - #define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100 2122 - #define FILE_SUPPORTS_REPARSE_POINTS 0x00000080 2123 - #define FILE_SUPPORTS_SPARSE_FILES 0x00000040 2124 - #define FILE_VOLUME_QUOTAS 0x00000020 2125 - #define FILE_FILE_COMPRESSION 0x00000010 2126 - #define FILE_PERSISTENT_ACLS 0x00000008 2127 - #define FILE_UNICODE_ON_DISK 0x00000004 2128 - #define FILE_CASE_PRESERVED_NAMES 0x00000002 2129 - #define FILE_CASE_SENSITIVE_SEARCH 0x00000001 2130 2103 typedef struct { 2131 2104 __le32 Attributes; 2132 2105 __le32 MaxPathNameComponentLength;
+42
fs/smb/common/fscc.h
··· 1 + /* SPDX-License-Identifier: LGPL-2.1 */ 2 + /* 3 + * 4 + * Copyright (c) International Business Machines Corp., 2009, 2013 5 + * Etersoft, 2012 6 + * 2018 Samsung Electronics Co., Ltd. 7 + * Author(s): Steve French (sfrench@us.ibm.com) 8 + * Pavel Shilovsky (pshilovsky@samba.org) 2012 9 + * Namjae Jeon (linkinjeon@kernel.org) 10 + * 11 + */ 12 + #ifndef _COMMON_SMB_FSCC_H 13 + #define _COMMON_SMB_FSCC_H 14 + 15 + /* List of FileSystemAttributes - see MS-FSCC 2.5.1 */ 16 + #define FILE_SUPPORTS_SPARSE_VDL 0x10000000 /* faster nonsparse extend */ 17 + #define FILE_SUPPORTS_BLOCK_REFCOUNTING 0x08000000 /* allow ioctl dup extents */ 18 + #define FILE_SUPPORT_INTEGRITY_STREAMS 0x04000000 19 + #define FILE_SUPPORTS_USN_JOURNAL 0x02000000 20 + #define FILE_SUPPORTS_OPEN_BY_FILE_ID 0x01000000 21 + #define FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000 22 + #define FILE_SUPPORTS_HARD_LINKS 0x00400000 23 + #define FILE_SUPPORTS_TRANSACTIONS 0x00200000 24 + #define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000 25 + #define FILE_READ_ONLY_VOLUME 0x00080000 26 + #define FILE_NAMED_STREAMS 0x00040000 27 + #define FILE_SUPPORTS_ENCRYPTION 0x00020000 28 + #define FILE_SUPPORTS_OBJECT_IDS 0x00010000 29 + #define FILE_VOLUME_IS_COMPRESSED 0x00008000 30 + #define FILE_SUPPORTS_POSIX_UNLINK_RENAME 0x00000400 31 + #define FILE_RETURNS_CLEANUP_RESULT_INFO 0x00000200 32 + #define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100 33 + #define FILE_SUPPORTS_REPARSE_POINTS 0x00000080 34 + #define FILE_SUPPORTS_SPARSE_FILES 0x00000040 35 + #define FILE_VOLUME_QUOTAS 0x00000020 36 + #define FILE_FILE_COMPRESSION 0x00000010 37 + #define FILE_PERSISTENT_ACLS 0x00000008 38 + #define FILE_UNICODE_ON_DISK 0x00000004 39 + #define FILE_CASE_PRESERVED_NAMES 0x00000002 40 + #define FILE_CASE_SENSITIVE_SEARCH 0x00000001 41 + 42 + #endif /* _COMMON_SMB_FSCC_H */
+1 -27
fs/smb/server/smb_common.h
··· 12 12 #include "nterr.h" 13 13 #include "../common/smbglob.h" 14 14 #include "../common/smb2pdu.h" 15 + #include "../common/fscc.h" 15 16 #include "smb2pdu.h" 16 17 17 18 /* ksmbd's Specific ERRNO */ ··· 48 47 #define ATTR_RANDOM_ACCESS 0x10000000 49 48 #define ATTR_NO_BUFFERING 0x20000000 50 49 #define ATTR_WRITE_THROUGH 0x80000000 51 - 52 - /* List of FileSystemAttributes - see 2.5.1 of MS-FSCC */ 53 - #define FILE_SUPPORTS_SPARSE_VDL 0x10000000 /* faster nonsparse extend */ 54 - #define FILE_SUPPORTS_BLOCK_REFCOUNTING 0x08000000 /* allow ioctl dup extents */ 55 - #define FILE_SUPPORT_INTEGRITY_STREAMS 0x04000000 56 - #define FILE_SUPPORTS_USN_JOURNAL 0x02000000 57 - #define FILE_SUPPORTS_OPEN_BY_FILE_ID 0x01000000 58 - #define FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000 59 - #define FILE_SUPPORTS_HARD_LINKS 0x00400000 60 - #define FILE_SUPPORTS_TRANSACTIONS 0x00200000 61 - #define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000 62 - #define FILE_READ_ONLY_VOLUME 0x00080000 63 - #define FILE_NAMED_STREAMS 0x00040000 64 - #define FILE_SUPPORTS_ENCRYPTION 0x00020000 65 - #define FILE_SUPPORTS_OBJECT_IDS 0x00010000 66 - #define FILE_VOLUME_IS_COMPRESSED 0x00008000 67 - #define FILE_SUPPORTS_POSIX_UNLINK_RENAME 0x00000400 68 - #define FILE_RETURNS_CLEANUP_RESULT_INFO 0x00000200 69 - #define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100 70 - #define FILE_SUPPORTS_REPARSE_POINTS 0x00000080 71 - #define FILE_SUPPORTS_SPARSE_FILES 0x00000040 72 - #define FILE_VOLUME_QUOTAS 0x00000020 73 - #define FILE_FILE_COMPRESSION 0x00000010 74 - #define FILE_PERSISTENT_ACLS 0x00000008 75 - #define FILE_UNICODE_ON_DISK 0x00000004 76 - #define FILE_CASE_PRESERVED_NAMES 0x00000002 77 - #define FILE_CASE_SENSITIVE_SEARCH 0x00000001 78 50 79 51 /* Combinations of file access permission bits */ 80 52 #define SET_FILE_READ_RIGHTS (FILE_READ_DATA | FILE_READ_EA \