summaryrefslogtreecommitdiff
path: root/fs/f2fs/acl.c
diff options
context:
space:
mode:
authorHans Holmberg <hans.holmberg@wdc.com>2023-02-20 15:20:04 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2023-03-30 01:17:39 +0300
commit92318f20d703885d0602bb5654a52d593ca45e30 (patch)
tree5ad50539e795fa4605c28bda96d32db59c1dfffe /fs/f2fs/acl.c
parentbabedcbac164cec970872b8097401ca913a80e61 (diff)
downloadlinux-92318f20d703885d0602bb5654a52d593ca45e30.tar.xz
f2fs: preserve direct write semantics when buffering is forced
In some cases, e.g. for zoned block devices, direct writes are forced into buffered writes that will populate the page cache and be written out just like buffered io. Direct reads, on the other hand, is supported for the zoned block device case. This has the effect that applications built for direct io will fill up the page cache with data that will never be read, and that is a waste of resources. If we agree that this is a problem, how do we fix it? A) Supporting proper direct writes for zoned block devices would be the best, but it is currently not supported (probably for a good but non-obvious reason). Would it be feasible to implement proper direct IO? B) Avoid the cost of keeping unwanted data by syncing and throwing out the cached pages for buffered O_DIRECT writes before completion. This patch implements B) by reusing the code for how partial block writes are flushed out on the "normal" direct write path. Note that this changes the performance characteristics of f2fs quite a bit. Direct IO performance for zoned block devices is lower for small writes after this patch, but this should be expected with direct IO and in line with how f2fs behaves on top of conventional block devices. Another open question is if the flushing should be done for all cases where buffered writes are forced. Signed-off-by: Hans Holmberg <hans.holmberg@wdc.com> Reviewed-by: Yonggil Song <yonggil.song@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/acl.c')
0 files changed, 0 insertions, 0 deletions