Rewrite minor number decoding. Now we have only three types of
object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256). Correct formats for some error messages. Don't cast the value to match the format.
This commit is contained in:
parent
9ebe817222
commit
0910419967
@ -37,7 +37,7 @@
|
||||
* otherwise) arising in any way out of the use of this software, even if
|
||||
* advised of the possibility of such damage.
|
||||
*
|
||||
* $Id: vinumrevive.c,v 1.15 2001/05/23 23:04:48 grog Exp grog $
|
||||
* $Id: vinumrevive.c,v 1.18 2003/04/28 02:54:43 grog Exp $
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
@ -131,7 +131,7 @@ revive_block(int sdno)
|
||||
break;
|
||||
|
||||
case plex_disorg: /* to keep the compiler happy */
|
||||
break;
|
||||
break; /* to keep the pedants happy */
|
||||
}
|
||||
|
||||
if (paritysd) { /* we're reviving a parity block, */
|
||||
@ -159,7 +159,7 @@ revive_block(int sdno)
|
||||
* First, read the data from the volume. We
|
||||
* don't care which plex, that's bre's job.
|
||||
*/
|
||||
bp->b_dev = VINUMDEV(plex->volno, 0, 0, VINUM_VOLUME_TYPE); /* create the device number */
|
||||
bp->b_dev = VINUM_VOL(plex->volno); /* create the device number */
|
||||
else /* it's an unattached plex */
|
||||
bp->b_dev = VINUM_PLEX(sd->plexno); /* create the device number */
|
||||
|
||||
@ -210,7 +210,7 @@ revive_block(int sdno)
|
||||
rq->bp->b_iocmd == BIO_READ ? "Read" : "Write",
|
||||
major(rq->bp->b_dev),
|
||||
minor(rq->bp->b_dev),
|
||||
(long long)rq->bp->b_blkno,
|
||||
rq->bp->b_blkno,
|
||||
rq->bp->b_bcount);
|
||||
#endif
|
||||
launch_requests(sd->waitlist, 1); /* do them now */
|
||||
@ -307,7 +307,7 @@ parityops(struct vinum_ioctl_msg *data)
|
||||
reply->error = EIO;
|
||||
sprintf(reply->msg,
|
||||
"Parity incorrect at offset 0x%llx\n",
|
||||
(long long)errorloc);
|
||||
errorloc);
|
||||
}
|
||||
if (reply->error == EAGAIN) { /* still OK, */
|
||||
plex->checkblock = pstripe + (pbp->b_bcount >> DEV_BSHIFT); /* moved this much further down */
|
||||
|
Loading…
x
Reference in New Issue
Block a user