summaryrefslogtreecommitdiffstats
path: root/COPYING
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2013-10-01 16:44:53 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2013-10-01 16:44:53 +0200
commit8b284dc47291daf72fe300e1138a2e7ed56f38ab (patch)
tree980b7fa50cd582b9e13da1458afd8d8921e0513c /COPYING
parent1e112a484e58cd13e6c90a3dfd9e54ea5859b795 (diff)
downloadop-kernel-dev-8b284dc47291daf72fe300e1138a2e7ed56f38ab.zip
op-kernel-dev-8b284dc47291daf72fe300e1138a2e7ed56f38ab.tar.gz
fuse: writepages: handle same page rewrites
As Maxim Patlasov pointed out, it's possible to get a dirty page while it's copy is still under writeback, despite fuse_page_mkwrite() doing its thing (direct IO). This could result in two concurrent write request for the same offset, with data corruption if they get mixed up. To prevent this, fuse needs to check and delay such writes. This implementation does this by: 1. check if page is still under writeout, if so create a new, single page secondary request for it 2. chain this secondary request onto the in-flight request 2/a. if a seconday request for the same offset was already chained to the in-flight request, then just copy the contents of the page and discard the new secondary request. This makes sure that for each page will have at most two requests associated with it 3. when the in-flight request finished, send off all secondary requests chained onto it Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud