FreeBSD Bugzilla – Attachment 186510 Details for
Bug 222288
g_bio leak after zfs ABD commit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
alternative patch
vdev_geom.ioctl-bio-free.diff (text/plain), 1.44 KB, created by
Andriy Gapon
on 2017-09-18 14:26:34 UTC
(
hide
)
Description:
alternative patch
Filename:
MIME Type:
Creator:
Andriy Gapon
Created:
2017-09-18 14:26:34 UTC
Size:
1.44 KB
patch
obsolete
>diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c >index 000a1e2de6e04..b4cc1865bc8c3 100644 >--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c >+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c >@@ -988,7 +988,16 @@ vdev_geom_io_intr(struct bio *bp) > } > break; > } > >+ /* >+ * We have to split bio freeing into two parts, because the ABD code >+ * cannot be called in this context and vdev_op_io_done is not called >+ * for ZIO_TYPE_IOCTL zio-s. >+ */ >+ if (zio->io_type != ZIO_TYPE_READ && zio->io_type != ZIO_TYPE_WRITE) { >+ g_destroy_bio(bp); >+ zio->io_bio = NULL; >+ } > zio_delay_interrupt(zio); > } > >@@ -1090,21 +1099,23 @@ vdev_geom_io_done(zio_t *zio) > { > struct bio *bp = zio->io_bio; > >+ if (zio->io_type != ZIO_TYPE_READ && zio->io_type != ZIO_TYPE_WRITE) { >+ ASSERT(bp == NULL); >+ return; >+ } >+ > if (bp == NULL) { >- ASSERT3S(zio->io_error, !=, 0); >- IMPLY(zio->io_type == ZIO_TYPE_READ || >- zio->io_type == ZIO_TYPE_WRITE, >- zio->io_error == ENXIO); >+ ASSERT3S(zio->io_error, ==, ENXIO); > return; > } > >- if (zio->io_type == ZIO_TYPE_READ) { >+ if (zio->io_type == ZIO_TYPE_READ) > abd_return_buf_copy(zio->io_abd, bp->bio_data, zio->io_size); >- } else if (zio->io_type == ZIO_TYPE_WRITE) { >+ else > abd_return_buf(zio->io_abd, bp->bio_data, zio->io_size); >- } > > g_destroy_bio(bp); >+ zio->io_bio = NULL; > } > > static void
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 222288
:
186415
| 186510