FreeBSD Bugzilla – Attachment 104087 Details for
Bug 144214
zfsboot fails on gang block after upgrade to zfs v14
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
gang.diff
gang.diff (text/plain), 1.03 KB, created by
Andriy Gapon
on 2010-05-27 00:02:03 UTC
(
hide
)
Description:
gang.diff
Filename:
MIME Type:
Creator:
Andriy Gapon
Created:
2010-05-27 00:02:03 UTC
Size:
1.03 KB
patch
obsolete
>diff --git a/sys/boot/zfs/zfsimpl.c b/sys/boot/zfs/zfsimpl.c >index 1407eb5..6401c6b 100644 >--- a/sys/boot/zfs/zfsimpl.c >+++ b/sys/boot/zfs/zfsimpl.c >@@ -958,12 +969,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 +1010,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);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 144214
:
104086
| 104087