[Bug 276002] nfscl: data corruption using both copy_file_range and mmap'd I/O

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 01 Jan 2024 23:21:10 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276002

--- Comment #42 from Rick Macklem <rmacklem@FreeBSD.org> ---
If I am reading the code correctly (I may not be),
it seems that vfs_buf_test_cache() will clear B_CACHE
if any of the pages allocbuf() has added to a
new buffer are not valid.

So, if a buffer cache block is for the first 1Mbyte
of the file, but the mmap(2)'d process has only touched
one page within that first 1Mbyte, does B_CACHE get cleared?
(And then the read-ahead happens, overwriting the dirty page.)

-- 
You are receiving this mail because:
You are the assignee for the bug.