diff options
author | Steve French <smfrench@gmail.com> | 2013-10-14 15:31:32 -0500 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-10-28 09:22:31 -0500 |
commit | 64a5cfa6db94c5abba2cafe77aca077dd1e3283b (patch) | |
tree | 4a17ded1db5b4e83ced56aa4d6d081d2a72211e4 /fs/cifs/smb2pdu.h | |
parent | 7ff8d45c9dccf0744404d6fe44468ede7c1b9533 (diff) | |
download | linux-64a5cfa6db94c5abba2cafe77aca077dd1e3283b.tar.gz linux-64a5cfa6db94c5abba2cafe77aca077dd1e3283b.tar.bz2 linux-64a5cfa6db94c5abba2cafe77aca077dd1e3283b.zip |
Allow setting per-file compression via SMB2/3
Allow cifs/smb2/smb3 to return whether or not a file is compressed
via lsattr, and allow SMB2/SMB3 to set the per-file compression
flag ("chattr +c filename" on an smb3 mount).
Windows users often set the compressed flag (it can be
done from the desktop and file manager). David Disseldorp
has patches to Samba server to support this (at least on btrfs)
which are complementary to this
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb2pdu.h')
-rw-r--r-- | fs/cifs/smb2pdu.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/cifs/smb2pdu.h b/fs/cifs/smb2pdu.h index b83d0118a757..c7c3c8294d1a 100644 --- a/fs/cifs/smb2pdu.h +++ b/fs/cifs/smb2pdu.h @@ -569,6 +569,13 @@ struct network_interface_info_ioctl_rsp { #define NO_FILE_ID 0xFFFFFFFFFFFFFFFFULL /* general ioctls to srv not to file */ +struct compress_ioctl { + __le16 CompressionState; +} __packed; + +#define COMPRESSION_FORMAT_NONE 0x0000 +#define COMPRESSION_FORMAT_DEFAULT 0x0001 +#define COMPRESSION_FORMAT_LZNT1 0x0002 struct smb2_ioctl_req { struct smb2_hdr hdr; __le16 StructureSize; /* Must be 57 */ @@ -584,7 +591,7 @@ struct smb2_ioctl_req { __le32 MaxOutputResponse; __le32 Flags; __u32 Reserved2; - char Buffer[0]; + __u8 Buffer[0]; } __packed; struct smb2_ioctl_rsp { |