summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/fuse.h
diff options
context:
space:
mode:
authorPavel Emelyanov2013-10-10 15:12:05 +0200
committerMiklos Szeredi2014-04-02 15:38:50 +0200
commitea8cd33390fafc1eca06a26e6a9c7bf1d386526f (patch)
treeeb0b3ecdf4760b3b96bc2d0d179e4c59c33d7ade /include/uapi/linux/fuse.h
parentfuse: fuse_flush() should wait on writeback (diff)
downloadkernel-qcow2-linux-ea8cd33390fafc1eca06a26e6a9c7bf1d386526f.tar.gz
kernel-qcow2-linux-ea8cd33390fafc1eca06a26e6a9c7bf1d386526f.tar.xz
kernel-qcow2-linux-ea8cd33390fafc1eca06a26e6a9c7bf1d386526f.zip
fuse: Fix O_DIRECT operations vs cached writeback misorder
The problem is: 1. write cached data to a file 2. read directly from the same file (via another fd) The 2nd operation may read stale data, i.e. the one that was in a file before the 1st op. Problem is in how fuse manages writeback. When direct op occurs the core kernel code calls filemap_write_and_wait to flush all the cached ops in flight. But fuse acks the writeback right after the ->writepages callback exits w/o waiting for the real write to happen. Thus the subsequent direct op proceeds while the real writeback is still in flight. This is a problem for backends that reorder operation. Fix this by making the fuse direct IO callback explicitly wait on the in-flight writeback to finish. Signed-off-by: Maxim Patlasov <MPatlasov@parallels.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'include/uapi/linux/fuse.h')
0 files changed, 0 insertions, 0 deletions