diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2017-03-19 16:01:09 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2017-03-19 16:01:09 +0000 |
commit | 0312d22588350ea98b5b6d485d064dba424484df (patch) | |
tree | 10c94c344ecaca32528df8c18ba670c942930be1 /sys/dev | |
parent | a83528b973e932f97f171fee8c164f070c623b19 (diff) |
Restore behavior from before r1.376: only set bv_percent if a rebuild is
in progress. This eliminates the spurious and harmless "0% done" message
in the output of 'bioctl softraid0' reported by various on misc.
ok jsing
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/softraid.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 679162fbd22..fdde14be1df 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.377 2016/07/20 20:45:13 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.378 2017/03/19 16:01:08 tb Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -2616,7 +2616,8 @@ sr_ioctl_vol(struct sr_softc *sc, struct bioc_vol *bv) sd->mds.mdd_crypto.key_disk != NULL) bv->bv_nodisk++; #endif - bv->bv_percent = sr_rebuild_percent(sd); + if (bv->bv_status == BIOC_SVREBUILD) + bv->bv_percent = sr_rebuild_percent(sd); strlcpy(bv->bv_dev, sd->sd_meta->ssd_devname, sizeof(bv->bv_dev)); |