diff options
author | Steve French <smfrench@gmail.com> | 2015-06-24 10:17:02 +0200 |
---|---|---|
committer | Steve French <steve.french@primarydata.com> | 2015-06-29 04:15:45 +0200 |
commit | b3152e2c7aa9ad0c50085738d048fbf16d01d32d (patch) | |
tree | 2015cead72bda343290909c2187cf3039171d53b /fs/cifs/ioctl.c | |
parent | Add Get/Set Integrity Information structure definitions (diff) | |
download | linux-b3152e2c7aa9ad0c50085738d048fbf16d01d32d.tar.xz linux-b3152e2c7aa9ad0c50085738d048fbf16d01d32d.zip |
Add ioctl to set integrity
set integrity increases reliability of files stored on SMB3 servers.
Add ioctl to allow setting this on files on SMB3 and later mounts.
Signed-off-by: Steve French <steve.french@primarydata.com>
Diffstat (limited to 'fs/cifs/ioctl.c')
-rw-r--r-- | fs/cifs/ioctl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index 7843b19ef5be..49b8b6e41a18 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c @@ -35,6 +35,7 @@ #define CIFS_IOCTL_MAGIC 0xCF #define CIFS_IOC_COPYCHUNK_FILE _IOW(CIFS_IOCTL_MAGIC, 3, int) +#define CIFS_IOC_SET_INTEGRITY _IO(CIFS_IOCTL_MAGIC, 4) static long cifs_ioctl_clone(unsigned int xid, struct file *dst_file, unsigned long srcfd, u64 off, u64 len, u64 destoff, @@ -217,6 +218,16 @@ long cifs_ioctl(struct file *filep, unsigned int command, unsigned long arg) case BTRFS_IOC_CLONE: rc = cifs_ioctl_clone(xid, filep, arg, 0, 0, 0, true); break; + case CIFS_IOC_SET_INTEGRITY: + if (pSMBFile == NULL) + break; + tcon = tlink_tcon(pSMBFile->tlink); + if (tcon->ses->server->ops->set_integrity) + rc = tcon->ses->server->ops->set_integrity(xid, + tcon, pSMBFile); + else + rc = -EOPNOTSUPP; + break; default: cifs_dbg(FYI, "unsupported ioctl\n"); break; |