-/* $OpenBSD: softraid.c,v 1.425 2022/04/16 19:19:58 naddy Exp $ */
+/* $OpenBSD: softraid.c,v 1.426 2022/08/29 19:01:52 stsp Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
bv->bv_nodisk = sd->sd_meta->ssdi.ssd_chunk_no;
#ifdef CRYPTO
- if ((sd->sd_meta->ssdi.ssd_level == 'C' ||
- sd->sd_meta->ssdi.ssd_level == 0x1C) &&
+ if (sd->sd_meta->ssdi.ssd_level == 'C' &&
sd->mds.mdd_crypto.key_disk != NULL)
bv->bv_nodisk++;
+ else if (sd->sd_meta->ssdi.ssd_level == 0x1C &&
+ sd->mds.mdd_raid1c.sr1c_crypto.key_disk != NULL)
+ bv->bv_nodisk++;
#endif
if (bv->bv_status == BIOC_SVREBUILD)
bv->bv_percent = sr_rebuild_percent(sd);
src = sd->sd_vol.sv_chunks[bd->bd_diskid];
#ifdef CRYPTO
else if (bd->bd_diskid == sd->sd_meta->ssdi.ssd_chunk_no &&
- (sd->sd_meta->ssdi.ssd_level == 'C' ||
- sd->sd_meta->ssdi.ssd_level == 0x1C) &&
+ sd->sd_meta->ssdi.ssd_level == 'C' &&
sd->mds.mdd_crypto.key_disk != NULL)
src = sd->mds.mdd_crypto.key_disk;
+ else if (bd->bd_diskid == sd->sd_meta->ssdi.ssd_chunk_no &&
+ sd->sd_meta->ssdi.ssd_level == 0x1C &&
+ sd->mds.mdd_raid1c.sr1c_crypto.key_disk != NULL)
+ src = sd->mds.mdd_crypto.key_disk;
#endif
else
break;