diff options
| author | oster <oster@NetBSD.org> | 2009-02-07 20:36:49 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2009-02-07 20:36:49 +0000 |
| commit | ce32c4d01e60a61fe1a2526d84b016e1d32e6f6f (patch) | |
| tree | 8a594fd9544c7700568d1c9ceab00b418669f06f /sys/dev/raidframe | |
| parent | 4c7be59b17bf3ee217b065d0377375e7391d6b21 (diff) | |
Be consistent with wd.c and don't complain loudly if the underlying
device doesn't support flushing the cache. Fixes an issue (reported
privately) where ST39120A drives are not capable of flushing the
cache, and RAIDFrame was incessantly complaining.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index a4830b20f4c..30b5e187c00 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.254 2009/01/18 16:37:19 christos Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.255 2009/02/07 20:36:49 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -139,7 +139,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.254 2009/01/18 16:37:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.255 2009/02/07 20:36:49 oster Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -3683,8 +3683,9 @@ rf_sync_component_caches(RF_Raid_t *raidPtr) e = VOP_IOCTL(raidPtr->raid_cinfo[c].ci_vp, DIOCCACHESYNC, &force, FWRITE, NOCRED); if (e) { - printf("raid%d: cache flush to component %s failed.\n", - raidPtr->raidid, raidPtr->Disks[c].devname); + if (e != ENODEV) + printf("raid%d: cache flush to component %s failed.\n", + raidPtr->raidid, raidPtr->Disks[c].devname); if (error == 0) { error = e; } @@ -3699,8 +3700,9 @@ rf_sync_component_caches(RF_Raid_t *raidPtr) e = VOP_IOCTL(raidPtr->raid_cinfo[sparecol].ci_vp, DIOCCACHESYNC, &force, FWRITE, NOCRED); if (e) { - printf("raid%d: cache flush to component %s failed.\n", - raidPtr->raidid, raidPtr->Disks[sparecol].devname); + if (e != ENODEV) + printf("raid%d: cache flush to component %s failed.\n", + raidPtr->raidid, raidPtr->Disks[sparecol].devname); if (error == 0) { error = e; } |
