summaryrefslogtreecommitdiffstats
path: root/sys/geom/mirror
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2006-02-12 17:38:09 +0000
committerpjd <pjd@FreeBSD.org>2006-02-12 17:38:09 +0000
commitdded50a417fa1ce2e7778f5e6716194089a1891b (patch)
treed936db63a6dbb38a908d33970600a12f8d660ab8 /sys/geom/mirror
parenta9a29a482122cf63a18b559a9601ce344daa68b8 (diff)
downloadFreeBSD-src-dded50a417fa1ce2e7778f5e6716194089a1891b.zip
FreeBSD-src-dded50a417fa1ce2e7778f5e6716194089a1891b.tar.gz
On component state change to ACTIVE don't forget to update metadata.
MFC after: 3 days
Diffstat (limited to 'sys/geom/mirror')
-rw-r--r--sys/geom/mirror/g_mirror.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index 80c6309..ce6ea5d 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -2188,9 +2188,7 @@ again:
g_mirror_disk_state2str(disk->d_state)));
DISK_STATE_CHANGED();
- if (disk->d_state == G_MIRROR_DISK_STATE_NEW)
- disk->d_flags &= ~G_MIRROR_DISK_FLAG_DIRTY;
- else if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) {
+ if (disk->d_state == G_MIRROR_DISK_STATE_SYNCHRONIZING) {
disk->d_flags &= ~G_MIRROR_DISK_FLAG_SYNCHRONIZING;
disk->d_flags &= ~G_MIRROR_DISK_FLAG_FORCE_SYNC;
g_mirror_sync_stop(disk, 0);
@@ -2199,6 +2197,7 @@ again:
disk->d_sync.ds_offset = 0;
disk->d_sync.ds_offset_done = 0;
g_mirror_update_idle(sc, disk);
+ g_mirror_update_metadata(disk);
G_MIRROR_DEBUG(0, "Device %s: provider %s activated.",
sc->sc_name, g_mirror_get_diskname(disk));
break;
OpenPOWER on IntegriCloud