Skip to content

Commit 84d8d4c

Browse files
ChenXiaoSongsmfrench
authored andcommitted
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>
1 parent d8ac987 commit 84d8d4c

4 files changed

Lines changed: 44 additions & 54 deletions

File tree

fs/smb/client/cifsglob.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <uapi/linux/cifs/cifs_mount.h>
2727
#include "../common/smbglob.h"
2828
#include "../common/smb2pdu.h"
29+
#include "../common/fscc.h"
2930
#include "smb2pdu.h"
3031
#include <linux/filelock.h>
3132

fs/smb/client/cifspdu.h

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2100,33 +2100,6 @@ typedef struct {
21002100
/* minimum includes first three fields, and empty FS Name */
21012101
#define MIN_FS_ATTR_INFO_SIZE 12
21022102

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
21302103
typedef struct {
21312104
__le32 Attributes;
21322105
__le32 MaxPathNameComponentLength;

fs/smb/common/fscc.h

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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 */

fs/smb/server/smb_common.h

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "nterr.h"
1313
#include "../common/smbglob.h"
1414
#include "../common/smb2pdu.h"
15+
#include "../common/fscc.h"
1516
#include "smb2pdu.h"
1617

1718
/* ksmbd's Specific ERRNO */
@@ -48,33 +49,6 @@
4849
#define ATTR_NO_BUFFERING 0x20000000
4950
#define ATTR_WRITE_THROUGH 0x80000000
5051

51-
/* List of FileSystemAttributes - see 2.5.1 of MS-FSCC */
52-
#define FILE_SUPPORTS_SPARSE_VDL 0x10000000 /* faster nonsparse extend */
53-
#define FILE_SUPPORTS_BLOCK_REFCOUNTING 0x08000000 /* allow ioctl dup extents */
54-
#define FILE_SUPPORT_INTEGRITY_STREAMS 0x04000000
55-
#define FILE_SUPPORTS_USN_JOURNAL 0x02000000
56-
#define FILE_SUPPORTS_OPEN_BY_FILE_ID 0x01000000
57-
#define FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000
58-
#define FILE_SUPPORTS_HARD_LINKS 0x00400000
59-
#define FILE_SUPPORTS_TRANSACTIONS 0x00200000
60-
#define FILE_SEQUENTIAL_WRITE_ONCE 0x00100000
61-
#define FILE_READ_ONLY_VOLUME 0x00080000
62-
#define FILE_NAMED_STREAMS 0x00040000
63-
#define FILE_SUPPORTS_ENCRYPTION 0x00020000
64-
#define FILE_SUPPORTS_OBJECT_IDS 0x00010000
65-
#define FILE_VOLUME_IS_COMPRESSED 0x00008000
66-
#define FILE_SUPPORTS_POSIX_UNLINK_RENAME 0x00000400
67-
#define FILE_RETURNS_CLEANUP_RESULT_INFO 0x00000200
68-
#define FILE_SUPPORTS_REMOTE_STORAGE 0x00000100
69-
#define FILE_SUPPORTS_REPARSE_POINTS 0x00000080
70-
#define FILE_SUPPORTS_SPARSE_FILES 0x00000040
71-
#define FILE_VOLUME_QUOTAS 0x00000020
72-
#define FILE_FILE_COMPRESSION 0x00000010
73-
#define FILE_PERSISTENT_ACLS 0x00000008
74-
#define FILE_UNICODE_ON_DISK 0x00000004
75-
#define FILE_CASE_PRESERVED_NAMES 0x00000002
76-
#define FILE_CASE_SENSITIVE_SEARCH 0x00000001
77-
7852
/* Combinations of file access permission bits */
7953
#define SET_FILE_READ_RIGHTS (FILE_READ_DATA | FILE_READ_EA \
8054
| FILE_READ_ATTRIBUTES \

0 commit comments

Comments
 (0)