vdev_raidz.c (251631) | vdev_raidz.c (254591) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 1464 unchanged lines hidden (view full) --- 1473 code = vdev_raidz_reconstruct_general(rm, tgts, ntgts); 1474 ASSERT(code < (1 << VDEV_RAIDZ_MAXPARITY)); 1475 ASSERT(code > 0); 1476 return (code); 1477} 1478 1479static int 1480vdev_raidz_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 1464 unchanged lines hidden (view full) --- 1473 code = vdev_raidz_reconstruct_general(rm, tgts, ntgts); 1474 ASSERT(code < (1 << VDEV_RAIDZ_MAXPARITY)); 1475 ASSERT(code > 0); 1476 return (code); 1477} 1478 1479static int 1480vdev_raidz_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize, |
1481 uint64_t *ashift) | 1481 uint64_t *logical_ashift, uint64_t *physical_ashift) |
1482{ 1483 vdev_t *cvd; 1484 uint64_t nparity = vd->vdev_nparity; 1485 int c; 1486 int lasterror = 0; 1487 int numerrors = 0; 1488 1489 ASSERT(nparity > 0); --- 12 unchanged lines hidden (view full) --- 1502 if (cvd->vdev_open_error != 0) { 1503 lasterror = cvd->vdev_open_error; 1504 numerrors++; 1505 continue; 1506 } 1507 1508 *asize = MIN(*asize - 1, cvd->vdev_asize - 1) + 1; 1509 *max_asize = MIN(*max_asize - 1, cvd->vdev_max_asize - 1) + 1; | 1482{ 1483 vdev_t *cvd; 1484 uint64_t nparity = vd->vdev_nparity; 1485 int c; 1486 int lasterror = 0; 1487 int numerrors = 0; 1488 1489 ASSERT(nparity > 0); --- 12 unchanged lines hidden (view full) --- 1502 if (cvd->vdev_open_error != 0) { 1503 lasterror = cvd->vdev_open_error; 1504 numerrors++; 1505 continue; 1506 } 1507 1508 *asize = MIN(*asize - 1, cvd->vdev_asize - 1) + 1; 1509 *max_asize = MIN(*max_asize - 1, cvd->vdev_max_asize - 1) + 1; |
1510 *ashift = MAX(*ashift, cvd->vdev_ashift); | 1510 *logical_ashift = MAX(*logical_ashift, cvd->vdev_ashift); 1511 *physical_ashift = MAX(*physical_ashift, 1512 cvd->vdev_physical_ashift); |
1511 } 1512 1513 *asize *= vd->vdev_children; 1514 *max_asize *= vd->vdev_children; 1515 1516 if (numerrors > nparity) { 1517 vd->vdev_stat.vs_aux = VDEV_AUX_NO_REPLICAS; 1518 return (lasterror); --- 719 unchanged lines hidden --- | 1513 } 1514 1515 *asize *= vd->vdev_children; 1516 *max_asize *= vd->vdev_children; 1517 1518 if (numerrors > nparity) { 1519 vd->vdev_stat.vs_aux = VDEV_AUX_NO_REPLICAS; 1520 return (lasterror); --- 719 unchanged lines hidden --- |