CIFS: Add brlock support for SMB2

Signed-off-by: Pavel Shilovsky <pshilovsky@etersoft.ru>
This commit is contained in:
Pavel Shilovsky
2012-09-19 06:22:43 -07:00
committed by Steve French
parent 027e8eec31
commit f7ba7fe685
7 changed files with 210 additions and 5 deletions

View File

@@ -531,6 +531,30 @@ struct smb2_write_rsp {
#define SMB2_LOCKFLAG_UNLOCK 0x0004
#define SMB2_LOCKFLAG_FAIL_IMMEDIATELY 0x0010
struct smb2_lock_element {
__le64 Offset;
__le64 Length;
__le32 Flags;
__le32 Reserved;
} __packed;
struct smb2_lock_req {
struct smb2_hdr hdr;
__le16 StructureSize; /* Must be 48 */
__le16 LockCount;
__le32 Reserved;
__u64 PersistentFileId; /* opaque endianness */
__u64 VolatileFileId; /* opaque endianness */
/* Followed by at least one */
struct smb2_lock_element locks[1];
} __packed;
struct smb2_lock_rsp {
struct smb2_hdr hdr;
__le16 StructureSize; /* Must be 4 */
__le16 Reserved;
} __packed;
struct smb2_echo_req {
struct smb2_hdr hdr;
__le16 StructureSize; /* Must be 4 */