HomeFreeBSD

Fix getblk() with GB_NOCREAT returning false-negatives.

Description

Fix getblk() with GB_NOCREAT returning false-negatives.

It is possible for a buf to be reassigned between the dirty and clean
lists while gbincore_unlocked() looks in each list. Avoid creating
a buffer in that case and fallback to a locked lookup.

This fixes a regression from r363482.

More discussion on potential improvements to the clean and dirty lists
handling is in the review.

Reviewed by: cem, kib, markj, vangyzen, rlibby
Reported by: Suraj.Raju at dell.com
Submitted by: Suraj.Raju at dell.com, cem, [based on both]
MFC after: 2 weeks
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D28375

Details

Provenance
bdreweryAuthored on Jan 27 2021, 5:59 PM
Reviewer
cem
Differential Revision
D28375: Fix getblk() with GB_NOCREAT returning false-negatives.
Parents
rGae257282ae5b: Regenerate src.conf.5 for MK_OPENSSL_KTLS
Branches
Unknown
Tags
Unknown