linux/fs/fuse
Pavel Emelyanov ea8cd33390 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>
2014-04-02 15:38:50 +02:00
..
control.c fs: Limit sys_mount to only request filesystem modules. 2013-03-03 19:36:31 -08:00
cuse.c fuse: Fix O_DIRECT operations vs cached writeback misorder 2014-04-02 15:38:50 +02:00
dev.c fuse: fix SetPageUptodate() condition in STORE 2014-01-22 19:36:58 +01:00
dir.c fuse: Trust kernel i_mtime only 2014-04-02 15:38:48 +02:00
file.c fuse: Fix O_DIRECT operations vs cached writeback misorder 2014-04-02 15:38:50 +02:00
fuse_i.h fuse: Fix O_DIRECT operations vs cached writeback misorder 2014-04-02 15:38:50 +02:00
inode.c fuse: Trust kernel i_mtime only 2014-04-02 15:38:48 +02:00
Kconfig fuse: Move CUSE Kconfig entry from fs/Kconfig into fs/fuse/Kconfig 2013-01-17 13:08:45 +01:00
Makefile CUSE: implement CUSE - Character device in Userspace 2009-06-09 11:24:11 +02:00