summaryrefslogtreecommitdiffstats
path: root/lib/klist.c
diff options
context:
space:
mode:
authorMaxim Patlasov <MPatlasov@parallels.com>2013-10-02 21:38:32 +0400
committerMiklos Szeredi <mszeredi@suse.cz>2013-11-05 10:11:27 +0100
commit6eaf4782eb09e28dbd13d23b9ce0fb7646daf37e (patch)
tree10416e984f694f35454238a2b7f1b8f72a214bdb /lib/klist.c
parentf6011081f5e290756bd90fe96f1e86d3eac76f77 (diff)
downloadop-kernel-dev-6eaf4782eb09e28dbd13d23b9ce0fb7646daf37e.zip
op-kernel-dev-6eaf4782eb09e28dbd13d23b9ce0fb7646daf37e.tar.gz
fuse: writepages: crop secondary requests
If writeback happens while fuse is in FUSE_NOWRITE condition, the request will be queued but not processed immediately (see fuse_flush_writepages()). Until FUSE_NOWRITE becomes relaxed, more writebacks can happen. They will be queued as "secondary" requests to that first ("primary") request. Existing implementation crops only primary request. This is not correct because a subsequent extending write(2) may increase i_size and then secondary requests won't be cropped properly. The result would be stale data written to the server to a file offset where zeros must be. Similar problem may happen if secondary requests are attached to an in-flight request that was already cropped. The patch solves the issue by cropping all secondary requests in fuse_writepage_end(). Thanks to Miklos for idea. Signed-off-by: Maxim Patlasov <MPatlasov@parallels.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'lib/klist.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud