diff options
| author | oster <oster@NetBSD.org> | 2003-12-31 04:00:01 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 2003-12-31 04:00:01 +0000 |
| commit | abbecc25a2348642d2a82c7666a9d09138de6fe9 (patch) | |
| tree | ce86f8eb2cfbf9769d254776ad85729316f125ca /sys/dev/raidframe | |
| parent | b7bb3e3c628fe19a4f1cbabad6646b43f8815b97 (diff) | |
Left-shift another else{} chunk. No functional changes.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_reconstruct.c | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index b72888142d5..de70d6b5e5a 100644 --- a/sys/dev/raidframe/rf_reconstruct.c +++ b/sys/dev/raidframe/rf_reconstruct.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.c,v 1.62 2003/12/31 03:51:28 oster Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.63 2003/12/31 04:00:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,7 +33,7 @@ ************************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.62 2003/12/31 03:51:28 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.63 2003/12/31 04:00:01 oster Exp $"); #include <sys/time.h> #include <sys/buf.h> @@ -451,45 +451,43 @@ rf_ReconstructInPlace(RF_Raid_t *raidPtr, RF_RowCol_t col) RF_UNLOCK_MUTEX(raidPtr->mutex); return(retcode); - } else { - /* Ok, so we can at least do a lookup... - How about actually getting a vp for it? */ - - if ((retcode = VOP_GETATTR(vp, &va, proc->p_ucred, - proc)) != 0) { - RF_LOCK_MUTEX(raidPtr->mutex); - raidPtr->reconInProgress--; - RF_UNLOCK_MUTEX(raidPtr->mutex); - return(retcode); - } - retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, - FREAD, proc->p_ucred, proc); - if (retcode) { - RF_LOCK_MUTEX(raidPtr->mutex); - raidPtr->reconInProgress--; - RF_UNLOCK_MUTEX(raidPtr->mutex); - return(retcode); - } + } + + /* Ok, so we can at least do a lookup... + How about actually getting a vp for it? */ + + if ((retcode = VOP_GETATTR(vp, &va, proc->p_ucred, proc)) != 0) { RF_LOCK_MUTEX(raidPtr->mutex); - raidPtr->Disks[col].blockSize = dpart.disklab->d_secsize; - - raidPtr->Disks[col].numBlocks = dpart.part->p_size - - rf_protectedSectors; - - raidPtr->raid_cinfo[col].ci_vp = vp; - raidPtr->raid_cinfo[col].ci_dev = va.va_rdev; - - raidPtr->Disks[col].dev = va.va_rdev; - - /* we allow the user to specify that only a fraction - of the disks should be used this is just for debug: - it speeds up * the parity scan */ - raidPtr->Disks[col].numBlocks = raidPtr->Disks[col].numBlocks * - rf_sizePercentage / 100; + raidPtr->reconInProgress--; RF_UNLOCK_MUTEX(raidPtr->mutex); + return(retcode); } + + retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, + FREAD, proc->p_ucred, proc); + if (retcode) { + RF_LOCK_MUTEX(raidPtr->mutex); + raidPtr->reconInProgress--; + RF_UNLOCK_MUTEX(raidPtr->mutex); + return(retcode); + } + RF_LOCK_MUTEX(raidPtr->mutex); + raidPtr->Disks[col].blockSize = dpart.disklab->d_secsize; + raidPtr->Disks[col].numBlocks = dpart.part->p_size - + rf_protectedSectors; + raidPtr->raid_cinfo[col].ci_vp = vp; + raidPtr->raid_cinfo[col].ci_dev = va.va_rdev; + + raidPtr->Disks[col].dev = va.va_rdev; + + /* we allow the user to specify that only a fraction + of the disks should be used this is just for debug: + it speeds up * the parity scan */ + raidPtr->Disks[col].numBlocks = raidPtr->Disks[col].numBlocks * + rf_sizePercentage / 100; + RF_UNLOCK_MUTEX(raidPtr->mutex); spareDiskPtr = &raidPtr->Disks[col]; spareDiskPtr->status = rf_ds_used_spare; |
