diff options
author | le <le@FreeBSD.org> | 2005-02-17 16:08:36 +0000 |
---|---|---|
committer | le <le@FreeBSD.org> | 2005-02-17 16:08:36 +0000 |
commit | 364c3f99964a169d96eb0e57e5ce6b87f4b47ace (patch) | |
tree | 1603c07fc65272f3dad2725ae4dd9d062518d6a7 /sys/geom/vinum | |
parent | f803d620f4eb977bdc7be885ecdbf7787344aba2 (diff) | |
download | FreeBSD-src-364c3f99964a169d96eb0e57e5ce6b87f4b47ace.zip FreeBSD-src-364c3f99964a169d96eb0e57e5ce6b87f4b47ace.tar.gz |
In case of drive errors, don't close the associated consumer and
detach it, but instead let the geom wither away.
Bump copyright year.
Diffstat (limited to 'sys/geom/vinum')
-rw-r--r-- | sys/geom/vinum/geom_vinum_drive.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/geom/vinum/geom_vinum_drive.c b/sys/geom/vinum/geom_vinum_drive.c index 279d569..9de19eb 100644 --- a/sys/geom/vinum/geom_vinum_drive.c +++ b/sys/geom/vinum/geom_vinum_drive.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2004 Lukas Ertl + * Copyright (c) 2004, 2005 Lukas Ertl * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -294,7 +294,6 @@ gv_drive_worker(void *arg) struct bio *bp, *cbp; struct g_geom *gp; struct g_provider *pp; - struct g_consumer *cp; struct gv_drive *d; struct gv_sd *s; struct gv_bioq *bq, *bq2; @@ -332,16 +331,9 @@ gv_drive_worker(void *arg) /* The request had an error, we need to clean up. */ if (error != 0) { g_topology_lock(); - cp = LIST_FIRST(&gp->consumer); - if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) - g_access(cp, -cp->acr, -cp->acw, - -cp->ace); gv_set_drive_state(d, GV_DRIVE_DOWN, GV_SETSTATE_FORCE | GV_SETSTATE_CONFIG); - if (cp->nstart == cp->nend) { - g_detach(cp); - g_destroy_consumer(cp); - } + g_wither_geom(d->geom, ENXIO); g_topology_unlock(); } |