diff options
author | Steve French <smfrench@gmail.com> | 2013-10-14 16:27:32 -0400 |
---|---|---|
committer | Steve French <smfrench@gmail.com> | 2013-11-02 13:52:44 -0400 |
commit | c7f508a99bf229963915e79a603e0618d1d2ba76 (patch) | |
tree | b2eaa3a16ccafe2aa1d28130edaa552dd900f66c /fs/cifs/smb1ops.c | |
parent | af6a12ea8d4bb39a87527835b943bde4215897e5 (diff) |
Allow setting per-file compression via CIFS protocol
An earlier patch allowed setting the per-file compression flag
"chattr +c filename"
on an smb2 or smb3 mount, and also allowed lsattr to return
whether a file on a cifs, or smb2/smb3 mount was compressed.
This patch extends the ability to set the per-file
compression flag to the cifs protocol, which uses a somewhat
different IOCTL mechanism than SMB2, although the payload
(the flags stored in the compression_state) are the same.
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/smb1ops.c')
-rw-r--r-- | fs/cifs/smb1ops.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/cifs/smb1ops.c b/fs/cifs/smb1ops.c index 09ef8f322c2a..384cffe42850 100644 --- a/fs/cifs/smb1ops.c +++ b/fs/cifs/smb1ops.c | |||
@@ -807,6 +807,13 @@ out: | |||
807 | } | 807 | } |
808 | 808 | ||
809 | static int | 809 | static int |
810 | cifs_set_compression(const unsigned int xid, struct cifs_tcon *tcon, | ||
811 | struct cifsFileInfo *cfile) | ||
812 | { | ||
813 | return CIFSSMB_set_compression(xid, tcon, cfile->fid.netfid); | ||
814 | } | ||
815 | |||
816 | static int | ||
810 | cifs_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon, | 817 | cifs_query_dir_first(const unsigned int xid, struct cifs_tcon *tcon, |
811 | const char *path, struct cifs_sb_info *cifs_sb, | 818 | const char *path, struct cifs_sb_info *cifs_sb, |
812 | struct cifs_fid *fid, __u16 search_flags, | 819 | struct cifs_fid *fid, __u16 search_flags, |
@@ -956,6 +963,7 @@ struct smb_version_operations smb1_operations = { | |||
956 | .set_path_size = CIFSSMBSetEOF, | 963 | .set_path_size = CIFSSMBSetEOF, |
957 | .set_file_size = CIFSSMBSetFileSize, | 964 | .set_file_size = CIFSSMBSetFileSize, |
958 | .set_file_info = smb_set_file_info, | 965 | .set_file_info = smb_set_file_info, |
966 | .set_compression = cifs_set_compression, | ||
959 | .echo = CIFSSMBEcho, | 967 | .echo = CIFSSMBEcho, |
960 | .mkdir = CIFSSMBMkDir, | 968 | .mkdir = CIFSSMBMkDir, |
961 | .mkdir_setinfo = cifs_mkdir_setinfo, | 969 | .mkdir_setinfo = cifs_mkdir_setinfo, |