aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/dbuf.c
diff options
context:
space:
mode:
authorGeorge Wilson <[email protected]>2013-07-02 13:26:24 -0700
committerBrian Behlendorf <[email protected]>2013-07-02 13:34:31 -0700
commit294f68063b49c06d3118d51016811063e69cf97a (patch)
tree2450bfc2356c54752214fb11fad14766c6c1ddb1 /module/zfs/dbuf.c
parent96b89346c074516a9bb130907646814208035ca8 (diff)
Illumos #3498 panic in arc_read()
3498 panic in arc_read(): !refcount_is_zero(&pbuf->b_hdr->b_refcnt) Reviewed by: Adam Leventhal <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Approved by: Richard Lowe <[email protected]> References: illumos/illumos-gate@1b912ec7100c10e7243bf0879af0fe580e08c73d https://www.illumos.org/issues/3498 Ported-by: Brian Behlendorf <[email protected]> Closes #1249
Diffstat (limited to 'module/zfs/dbuf.c')
-rw-r--r--module/zfs/dbuf.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c
index 83a8035dd..46f42dd7c 100644
--- a/module/zfs/dbuf.c
+++ b/module/zfs/dbuf.c
@@ -559,7 +559,6 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t *zio, uint32_t *flags)
spa_t *spa;
zbookmark_t zb;
uint32_t aflags = ARC_NOWAIT;
- arc_buf_t *pbuf;
DB_DNODE_ENTER(db);
dn = DB_DNODE(db);
@@ -621,14 +620,8 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t *zio, uint32_t *flags)
db->db.db_object, db->db_level, db->db_blkid);
dbuf_add_ref(db, NULL);
- /* ZIO_FLAG_CANFAIL callers have to check the parent zio's error */
- if (db->db_parent)
- pbuf = db->db_parent->db_buf;
- else
- pbuf = db->db_objset->os_phys_buf;
-
- (void) dsl_read(zio, spa, db->db_blkptr, pbuf,
+ (void) arc_read(zio, spa, db->db_blkptr,
dbuf_read_done, db, ZIO_PRIORITY_SYNC_READ,
(*flags & DB_RF_CANFAIL) ? ZIO_FLAG_CANFAIL : ZIO_FLAG_MUSTSUCCEED,
&aflags, &zb);
@@ -1026,7 +1019,6 @@ void
dbuf_release_bp(dmu_buf_impl_t *db)
{
objset_t *os;
- zbookmark_t zb;
DB_GET_OBJSET(&os, db);
ASSERT(dsl_pool_sync_context(dmu_objset_pool(os)));
@@ -1034,13 +1026,7 @@ dbuf_release_bp(dmu_buf_impl_t *db)
list_link_active(&os->os_dsl_dataset->ds_synced_link));
ASSERT(db->db_parent == NULL || arc_released(db->db_parent->db_buf));
- zb.zb_objset = os->os_dsl_dataset ?
- os->os_dsl_dataset->ds_object : 0;
- zb.zb_object = db->db.db_object;
- zb.zb_level = db->db_level;
- zb.zb_blkid = db->db_blkid;
- (void) arc_release_bp(db->db_buf, db,
- db->db_blkptr, os->os_spa, &zb);
+ (void) arc_release(db->db_buf, db);
}
dbuf_dirty_record_t *
@@ -1886,7 +1872,6 @@ dbuf_prefetch(dnode_t *dn, uint64_t blkid)
if (bp && !BP_IS_HOLE(bp)) {
int priority = dn->dn_type == DMU_OT_DDT_ZAP ?
ZIO_PRIORITY_DDT_PREFETCH : ZIO_PRIORITY_ASYNC_READ;
- arc_buf_t *pbuf;
dsl_dataset_t *ds = dn->dn_objset->os_dsl_dataset;
uint32_t aflags = ARC_NOWAIT | ARC_PREFETCH;
zbookmark_t zb;
@@ -1894,13 +1879,8 @@ dbuf_prefetch(dnode_t *dn, uint64_t blkid)
SET_BOOKMARK(&zb, ds ? ds->ds_object : DMU_META_OBJSET,
dn->dn_object, 0, blkid);
- if (db)
- pbuf = db->db_buf;
- else
- pbuf = dn->dn_objset->os_phys_buf;
-
- (void) dsl_read(NULL, dn->dn_objset->os_spa,
- bp, pbuf, NULL, NULL, priority,
+ (void) arc_read(NULL, dn->dn_objset->os_spa,
+ bp, NULL, NULL, priority,
ZIO_FLAG_CANFAIL | ZIO_FLAG_SPECULATIVE,
&aflags, &zb);
}