diff options
| author | Andriy Gapon <avg@FreeBSD.org> | 2010-05-28 07:34:20 +0000 |
|---|---|---|
| committer | Andriy Gapon <avg@FreeBSD.org> | 2010-05-28 07:34:20 +0000 |
| commit | 7bdc66dab87b94519dda8367a901f4d82adc7efd (patch) | |
| tree | 7a985b03fea778ea15497f2a9ba0a820423799cb /sys/boot | |
| parent | 52d8ba372e9d5e2833dd51b7afd0a8f7b7b7c2b7 (diff) | |
Notes
Diffstat (limited to 'sys/boot')
| -rw-r--r-- | sys/boot/zfs/zfsimpl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/boot/zfs/zfsimpl.c b/sys/boot/zfs/zfsimpl.c index 1407eb5d9c71..5be7afa364e6 100644 --- a/sys/boot/zfs/zfsimpl.c +++ b/sys/boot/zfs/zfsimpl.c @@ -958,12 +958,17 @@ zio_read_gang(spa_t *spa, const blkptr_t *bp, const dva_t *dva, void *buf) break; if (!vdev || !vdev->v_read) return (EIO); - if (vdev->v_read(vdev, bp, &zio_gb, offset, SPA_GANGBLOCKSIZE)) + if (vdev->v_read(vdev, NULL, &zio_gb, offset, SPA_GANGBLOCKSIZE)) return (EIO); for (i = 0; i < SPA_GBH_NBLKPTRS; i++) { - if (zio_read(spa, &zio_gb.zg_blkptr[i], buf)) + blkptr_t *gbp = &zio_gb.zg_blkptr[i]; + + if (BP_IS_HOLE(gbp)) + continue; + if (zio_read(spa, gbp, buf)) return (EIO); + buf = (char*)buf + BP_GET_PSIZE(gbp); } return (0); @@ -994,9 +999,8 @@ zio_read(spa_t *spa, const blkptr_t *bp, void *buf) continue; if (DVA_GET_GANG(dva)) { - printf("ZFS: gang block detected!\n"); if (zio_read_gang(spa, bp, dva, buf)) - return (EIO); + continue; } else { vdevid = DVA_GET_VDEV(dva); offset = DVA_GET_OFFSET(dva); |
