Module Name: src Committed By: christos Date: Fri Jul 31 20:34:38 UTC 2020
Modified Files: src/sys/dev/raidframe: rf_netbsdkintf.c Log Message: - don't overwrite existing error. - return the error not 0 if failing. To generate a diff of this commit: cvs rdiff -u -r1.386 -r1.387 src/sys/dev/raidframe/rf_netbsdkintf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.386 src/sys/dev/raidframe/rf_netbsdkintf.c:1.387 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.386 Fri Jul 31 15:30:09 2020 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Fri Jul 31 16:34:38 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.386 2020/07/31 19:30:09 christos Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.387 2020/07/31 20:34:38 christos Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008-2011 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.386 2020/07/31 19:30:09 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.387 2020/07/31 20:34:38 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_raid_autoconfig.h" @@ -3673,7 +3673,7 @@ rf_sync_component_cache(RF_Raid_t *raidP printf("raid%d: cache flush[%d] to component %s failed (%d)\n", raidPtr->raidid, i, raidPtr->Disks[c].devname, e); } - return 0; + return e; } int @@ -3685,7 +3685,7 @@ rf_sync_component_caches(RF_Raid_t *raid for (c = 0; c < raidPtr->numCol; c++) { if (raidPtr->Disks[c].status == rf_ds_optimal) { int e = rf_sync_component_cache(raidPtr, c); - if (error == 0) + if (e && !error) error = e; } } @@ -3695,7 +3695,7 @@ rf_sync_component_caches(RF_Raid_t *raid /* Need to ensure that the reconstruct actually completed! */ if (raidPtr->Disks[sparecol].status == rf_ds_used_spare) { int e = rf_sync_component_cache(raidPtr, sparecol); - if (error == 0) + if (e && !error) error = e; continue; }