Skip to content

Commit

Permalink
Full diff against ZOL commits changes
Browse files Browse the repository at this point in the history
  • Loading branch information
lundman committed Oct 6, 2017
1 parent 8748ffb commit e055647
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
12 changes: 4 additions & 8 deletions usr/src/uts/common/fs/zfs/arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -6318,6 +6318,8 @@ arc_write_ready(zio_t *zio)
HDR_SET_PSIZE(hdr, psize);
arc_hdr_set_compress(hdr, compress);

if (zio->io_error != 0 || psize == 0)
goto out;

/*
* Fill the hdr with data. If the buffer is encrypted we have no choice
Expand All @@ -6334,6 +6336,7 @@ arc_write_ready(zio_t *zio)
* the data into it; otherwise, we share the data directly if we can.
*/
if (ARC_BUF_ENCRYPTED(buf)) {
ASSERT3U(psize, >, 0);
ASSERT(ARC_BUF_COMPRESSED(buf));
arc_hdr_alloc_pabd(hdr, B_TRUE);
abd_copy(hdr->b_crypt_hdr.b_rabd, zio->io_abd, psize);
Expand Down Expand Up @@ -6365,6 +6368,7 @@ arc_write_ready(zio_t *zio)
arc_share_buf(hdr, buf);
}

out:
arc_hdr_verify(hdr, zio->io_bp);
}

Expand Down Expand Up @@ -6520,14 +6524,6 @@ arc_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp, arc_buf_t *buf,
zio_flags |= ZIO_FLAG_RAW_COMPRESS;
}

if (ARC_BUF_ENCRYPTED(buf)) {
ASSERT(ARC_BUF_COMPRESSED(buf));
zio_flags |= ZIO_FLAG_RAW;
} else if (ARC_BUF_COMPRESSED(buf)) {
ASSERT3U(zp->zp_compress, !=, ZIO_COMPRESS_OFF);
ASSERT3U(HDR_GET_LSIZE(hdr), !=, arc_buf_size(buf));
zio_flags |= ZIO_FLAG_RAW_COMPRESS;
}
callback = kmem_zalloc(sizeof (arc_write_callback_t), KM_SLEEP);
callback->awcb_ready = ready;
callback->awcb_children_ready = children_ready;
Expand Down
2 changes: 0 additions & 2 deletions usr/src/uts/common/fs/zfs/dmu_send.c
Original file line number Diff line number Diff line change
Expand Up @@ -2708,8 +2708,6 @@ receive_spill(struct receive_writer_arg *rwa, struct drr_spill *drrs,
if (drrs->drr_length < SPA_MINBLOCKSIZE ||
drrs->drr_length > spa_maxblocksize(dmu_objset_spa(rwa->os)))
return (SET_ERROR(EINVAL));
if (rwa->raw)
return (SET_ERROR(EINVAL));

if (rwa->raw) {
if (!DMU_OT_IS_VALID(drrs->drr_type) ||
Expand Down
3 changes: 1 addition & 2 deletions usr/src/uts/common/fs/zfs/dsl_destroy.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,7 @@ dsl_destroy_head_sync_impl(dsl_dataset_t *ds, dmu_tx_t *tx)
objset_t *os;
VERIFY0(dmu_objset_from_ds(ds, &os));

if (!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_ASYNC_DESTROY) ||
os->os_encrypted) {
if (!spa_feature_is_enabled(dp->dp_spa, SPA_FEATURE_ASYNC_DESTROY)) {
old_synchronous_dataset_destroy(ds, tx);
} else {
/*
Expand Down

0 comments on commit e055647

Please sign in to comment.