summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsglob.h
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2014-08-17 15:38:47 +0200
committerSteve French <smfrench@gmail.com>2014-08-18 01:12:38 +0200
commit31742c5a331766bc7df6b0d525df00c6cd20d5a6 (patch)
tree8a8ca459f4bc29c8c6898d09765b3130e24862e3 /fs/cifs/cifsglob.h
parentIncorrect error returned on setting file compressed on SMB2 (diff)
downloadlinux-31742c5a331766bc7df6b0d525df00c6cd20d5a6.tar.xz
linux-31742c5a331766bc7df6b0d525df00c6cd20d5a6.zip
enable fallocate punch hole ("fallocate -p") for SMB3
Implement FALLOC_FL_PUNCH_HOLE (which does not change the file size fortunately so this matches the behavior of the equivalent SMB3 fsctl call) for SMB3 mounts. This allows "fallocate -p" to work. It requires that the server support setting files as sparse (which Windows allows). Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/cifsglob.h')
-rw-r--r--fs/cifs/cifsglob.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index ce24c1fc2123..dfc731b02aa9 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -411,6 +411,8 @@ struct smb_version_operations {
unsigned int *, unsigned int *);
/* check if we need to issue closedir */
bool (*dir_needs_close)(struct cifsFileInfo *);
+ long (*fallocate)(struct file *, struct cifs_tcon *, int, loff_t,
+ loff_t);
};
struct smb_version_values {