Page MenuHomeFreeBSD

fusefs: fix an interaction between copy_file_range and mmap
ClosedPublic

Authored by asomers on Jan 13 2024, 10:43 PM.
Tags
None
Referenced Files
F108454425: D43451.id132798.diff
Fri, Jan 24, 11:29 PM
F108450457: D43451.id132798.diff
Fri, Jan 24, 10:06 PM
F108433738: D43451.id132794.diff
Fri, Jan 24, 5:51 PM
Unknown Object (File)
Sat, Jan 18, 9:24 PM
Unknown Object (File)
Sun, Jan 12, 11:54 PM
Unknown Object (File)
Fri, Jan 10, 9:20 PM
Unknown Object (File)
Thu, Jan 2, 6:54 AM
Unknown Object (File)
Nov 26 2024, 11:49 PM
Subscribers

Details

Summary

If a copy_file_range operation tries to read from a page that was
previously written via mmap, that page must be flushed first.

MFC after: 2 weeks

Test Plan

two test cases added to the fusefs test suite

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 55431
Build 52320: arc lint + arc unit

Event Timeline

sys/fs/fuse/fuse_vnops.c
912

Indent is strange.

I suggest to use (newly added) vnode_pager_clear_sync() instead, I do not think that possible optimization of flushing a range is significant there.

  • Use vnode_pager_clean_sync
This revision is now accepted and ready to land.Jan 15 2024, 9:53 PM