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
Unknown Object (File)
Tue, Nov 26, 11:49 PM
Unknown Object (File)
Sep 17 2024, 8:54 PM
Unknown Object (File)
Sep 17 2024, 2:17 PM
Unknown Object (File)
Sep 5 2024, 12:28 PM
Unknown Object (File)
Aug 18 2024, 9:06 PM
Unknown Object (File)
Aug 7 2024, 5:26 PM
Unknown Object (File)
Aug 6 2024, 4:59 PM
Unknown Object (File)
Jun 25 2024, 8:26 AM
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 Not Applicable
Unit
Tests Not Applicable

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