diff options
author | Scott Long <scottl@FreeBSD.org> | 2006-10-16 04:18:38 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2006-10-16 04:18:38 +0000 |
commit | 441f6d5dcac296a4e74d72fa43233f6f80cd5eea (patch) | |
tree | f9ab8d12d2f604c26a086cb17a9be1266d38f051 /sys/dev/mfi/mfi_disk.c | |
parent | 3fe3dba179f045bec0e1f9b8b883c51f05894abe (diff) | |
download | src-441f6d5dcac296a4e74d72fa43233f6f80cd5eea.tar.gz src-441f6d5dcac296a4e74d72fa43233f6f80cd5eea.zip |
- Add a command validator for use in debugging.
- Fix the locking protocol to eliminate races between normal I/O and AENs.
- Various small improvements and usability tweaks.
Sponsored by: IronPort
Portions Submitted by: Doug Ambrisko
Notes
Notes:
svn path=/head/; revision=163398
Diffstat (limited to 'sys/dev/mfi/mfi_disk.c')
-rw-r--r-- | sys/dev/mfi/mfi_disk.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/sys/dev/mfi/mfi_disk.c b/sys/dev/mfi/mfi_disk.c index 909adcfdbc1f..35de4df63e53 100644 --- a/sys/dev/mfi/mfi_disk.c +++ b/sys/dev/mfi/mfi_disk.c @@ -103,6 +103,7 @@ mfi_disk_attach(device_t dev) struct mfi_ld *ld; uint64_t sectors; uint32_t secsize; + char *state; sc = device_get_softc(dev); ld = device_get_ivars(dev); @@ -117,8 +118,27 @@ mfi_disk_attach(device_t dev) secsize = MFI_SECTOR_LEN; TAILQ_INSERT_TAIL(&sc->ld_controller->mfi_ld_tqh, ld, ld_link); - device_printf(dev, "%juMB (%ju sectors) RAID\n", - sectors / (1024 * 1024 / secsize), sectors); + switch (ld->ld_info->ld_config.params.state) { + case MFI_LD_STATE_OFFLINE: + state = "offline"; + break; + case MFI_LD_STATE_PARTIALLY_DEGRADED: + state = "partially degraded"; + break; + case MFI_LD_STATE_DEGRADED: + state = "degraded"; + break; + case MFI_LD_STATE_OPTIMAL: + state = "optimal"; + break; + default: + state = "unknown"; + break; + } + device_printf(dev, "%juMB (%ju sectors) RAID volume '%s' is %s\n", + sectors / (1024 * 1024 / secsize), sectors, + ld->ld_info->ld_config.properties.name, + state); sc->ld_disk = disk_alloc(); sc->ld_disk->d_drv1 = sc; |