summaryrefslogtreecommitdiffstats
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
authorMaxim Patlasov2012-12-18 11:05:08 +0100
committerMiklos Szeredi2013-04-18 10:55:24 +0200
commitefb9fa9e911b23c7ea5330215bda778a7c69dba8 (patch)
tree7af69df4b3f3c5b89dc0e245a974fec358f23028 /fs/fuse/fuse_i.h
parentfuse: optimize short direct reads (diff)
downloadkernel-qcow2-linux-efb9fa9e911b23c7ea5330215bda778a7c69dba8.tar.gz
kernel-qcow2-linux-efb9fa9e911b23c7ea5330215bda778a7c69dba8.tar.xz
kernel-qcow2-linux-efb9fa9e911b23c7ea5330215bda778a7c69dba8.zip
fuse: truncate file if async dio failed
The patch improves error handling in fuse_direct_IO(): if we successfully submitted several fuse requests on behalf of synchronous direct write extending file and some of them failed, let's try to do our best to clean-up. Changed in v2: reuse fuse_do_setattr(). Thanks to Brian for suggestion. Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r--fs/fuse/fuse_i.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 337169a406c9..53b830e3b38f 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -863,4 +863,7 @@ int fuse_dev_release(struct inode *inode, struct file *file);
void fuse_write_update_size(struct inode *inode, loff_t pos);
+int fuse_do_setattr(struct inode *inode, struct iattr *attr,
+ struct file *file);
+
#endif /* _FS_FUSE_I_H */