]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
g_vfs_done: Only report ENXIO once
authorWarner Losh <imp@FreeBSD.org>
Sun, 24 Apr 2022 19:54:29 +0000 (13:54 -0600)
committerWarner Losh <imp@FreeBSD.org>
Sun, 24 Apr 2022 20:01:33 +0000 (14:01 -0600)
commit347a8e93fe687d55f65a4b58a394a5632deca7ba
tree2073eba32bc1bae73b02ee4fa58f54156f313f9e
parente8827f4094cb9ec7c5a4dcf9ee144442c989cd0c
g_vfs_done: Only report ENXIO once

The contract with the lower layers is that once ENXIO is reported, all
further I/O to the device is not possible. This is reported when the
device departs for good or changes in some material manner out from
underneath the system. Since the lower layers terminate all pending I/O
when this is detected with ENXIO, reporting more than one provides no
extra value. ENXIO suppression done with atomics due to race described
in e8827f4094cb. It's on the error path and a rare event, so this won't affect
performance.

Sponsored by: Netflix
Reviewed by: mckusick, kib
Differential Revision: https://reviews.freebsd.org/D35034
sys/geom/geom_vfs.c