mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 17:59:32 +00:00
smb3: Add protocol structs for change notify support
Add the SMB3 protocol flag definitions and structs for change notify. Future patches will add the hooks to allow it to be invoked from the client. See MS-FSCC 2.6 and MS-SMB2 2.2.35 Signed-off-by: Steve French <stfrench@microsoft.com> Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
This commit is contained in:
parent
c425014afd
commit
edf3ef3707
1 changed files with 36 additions and 0 deletions
|
@ -1145,6 +1145,42 @@ struct smb2_write_rsp {
|
|||
__u8 Buffer[1];
|
||||
} __packed;
|
||||
|
||||
/* notify flags */
|
||||
#define SMB2_WATCH_TREE 0x0001
|
||||
|
||||
/* notify completion filter flags. See MS-FSCC 2.6 and MS-SMB2 2.2.35 */
|
||||
#define FILE_NOTIFY_CHANGE_FILE_NAME 0x00000001
|
||||
#define FILE_NOTIFY_CHANGE_DIR_NAME 0x00000002
|
||||
#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x00000004
|
||||
#define FILE_NOTIFY_CHANGE_SIZE 0x00000008
|
||||
#define FILE_NOTIFY_CHANGE_LAST_WRITE 0x00000010
|
||||
#define FILE_NOTIFY_CHANGE_LAST_ACCESS 0x00000020
|
||||
#define FILE_NOTIFY_CHANGE_CREATION 0x00000040
|
||||
#define FILE_NOTIFY_CHANGE_EA 0x00000080
|
||||
#define FILE_NOTIFY_CHANGE_SECURITY 0x00000100
|
||||
#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
|
||||
#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
|
||||
#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
|
||||
|
||||
struct smb2_change_notify_req {
|
||||
struct smb2_sync_hdr sync_hdr;
|
||||
__le16 StructureSize;
|
||||
__le16 Flags;
|
||||
__le32 OutputBufferLength;
|
||||
__u64 PersistentFileId; /* opaque endianness */
|
||||
__u64 VolatileFileId; /* opaque endianness */
|
||||
__le32 CompletionFilter;
|
||||
__u32 Reserved;
|
||||
} __packed;
|
||||
|
||||
struct smb2_change_notify_rsp {
|
||||
struct smb2_sync_hdr sync_hdr;
|
||||
__le16 StructureSize; /* Must be 9 */
|
||||
__le16 OutputBufferOffset;
|
||||
__le32 OutputBufferLength;
|
||||
__u8 Buffer[1]; /* array of file notify structs */
|
||||
} __packed;
|
||||
|
||||
#define SMB2_LOCKFLAG_SHARED_LOCK 0x0001
|
||||
#define SMB2_LOCKFLAG_EXCLUSIVE_LOCK 0x0002
|
||||
#define SMB2_LOCKFLAG_UNLOCK 0x0004
|
||||
|
|
Loading…
Reference in a new issue