HomeFreeBSD

Grab the rangelock unconditionally in zfs_getpages()

Description

Grab the rangelock unconditionally in zfs_getpages()

As a deadlock avoidance measure, zfs_getpages() would only try to
acquire a rangelock, falling back to a single-page read if this was not
possible. However, this is incompatible with direct I/O.

Instead, release the busy lock before trying to acquire the rangelock in
blocking mode. This means that it's possible for the page to be
replaced, so we have to re-lookup.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Mark Johnston <markj@FreeBSD.org>
Closes #16643

Details

Provenance
markjAuthored on Oct 13 2024, 4:17 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Nov 13 2024, 3:25 PM
Parents
rG25eb53877838: Fix a potential page leak in mappedread_sf()
Branches
Unknown
Tags
Unknown

Event Timeline