diff options
author | pjd <pjd@FreeBSD.org> | 2004-10-07 20:13:23 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2004-10-07 20:13:23 +0000 |
commit | 8ad6178d29fba3a8f45a26258d6474ec9aba49cd (patch) | |
tree | 22d4c58f3cf652ab0672a0221a693fc2eb1dfc77 /sys | |
parent | 058a8fa0b8d64f4e20b3b2576702171acacabc42 (diff) | |
download | FreeBSD-src-8ad6178d29fba3a8f45a26258d6474ec9aba49cd.zip FreeBSD-src-8ad6178d29fba3a8f45a26258d6474ec9aba49cd.tar.gz |
Be sure to always return 0 for negative access requests.
Reported by: Maciej Kucharz <qk@comp.waw.pl>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/geom/mirror/g_mirror.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index 928efa0..9c023a1 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -2366,6 +2366,14 @@ g_mirror_access(struct g_provider *pp, int acr, int acw, int ace) G_MIRROR_EVENT_DONTWAIT); } } + /* + * Be sure to return 0 for negativate access requests. + * In case of some HW problems, it is possible that we don't have + * any active disk here, so loop above will be no-op and error will + * be ENXIO. + */ + if (error != 0 && acr <= 0 && acw <= 0 && ace <= 0) + error = 0; return (error); } |