diff options
author | pjd <pjd@FreeBSD.org> | 2006-04-10 10:32:22 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2006-04-10 10:32:22 +0000 |
commit | d7eb5b2fe93038a4783beb3079adb93fae2c27b0 (patch) | |
tree | 4dd1886c4f76f51d427f0bee1667c6f7f03e59c6 /sys/geom/raid3/g_raid3.h | |
parent | eb2ebcc8553acb18cc95142aacf36557bd7b4a97 (diff) | |
download | FreeBSD-src-d7eb5b2fe93038a4783beb3079adb93fae2c27b0.zip FreeBSD-src-d7eb5b2fe93038a4783beb3079adb93fae2c27b0.tar.gz |
Introduce and use delayed-destruction functionality from a pre-sync hook,
which means that devices will be destroyed on last close.
This fixes destruction order problems when, eg. RAID3 array is build on
top of RAID1 arrays.
Requested, reviewed and tested by: ru
MFC after: 2 weeks
Diffstat (limited to 'sys/geom/raid3/g_raid3.h')
-rw-r--r-- | sys/geom/raid3/g_raid3.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/geom/raid3/g_raid3.h b/sys/geom/raid3/g_raid3.h index c6e6b90..1032142 100644 --- a/sys/geom/raid3/g_raid3.h +++ b/sys/geom/raid3/g_raid3.h @@ -160,6 +160,7 @@ struct g_raid3_event { #define G_RAID3_DEVICE_FLAG_DESTROY 0x0100000000000000ULL #define G_RAID3_DEVICE_FLAG_WAIT 0x0200000000000000ULL +#define G_RAID3_DEVICE_FLAG_DESTROYING 0x0400000000000000ULL #define G_RAID3_DEVICE_STATE_STARTING 0 #define G_RAID3_DEVICE_STATE_DEGRADED 1 @@ -243,7 +244,10 @@ struct g_raid3_softc { const char *g_raid3_get_diskname(struct g_raid3_disk *disk); u_int g_raid3_ndisks(struct g_raid3_softc *sc, int state); -int g_raid3_destroy(struct g_raid3_softc *sc, boolean_t force); +#define G_RAID3_DESTROY_SOFT 0 +#define G_RAID3_DESTROY_DELAYED 1 +#define G_RAID3_DESTROY_HARD 2 +int g_raid3_destroy(struct g_raid3_softc *sc, int how); int g_raid3_event_send(void *arg, int state, int flags); struct g_raid3_metadata; int g_raid3_add_disk(struct g_raid3_softc *sc, struct g_provider *pp, |