mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Illumos 4757, 4913
4757 ZFS embedded-data block pointers ("zero block compression")
4913 zfs release should not be subject to space checks
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Max Grossman <max.grossman@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Dan McDonald <danmcd@omniti.com>
References:
https://www.illumos.org/issues/4757
https://www.illumos.org/issues/4913
https://github.com/illumos/illumos-gate/commit/5d7b4d4
Porting notes:
For compatibility with the fastpath code the zio_done() function
needed to be updated. Because embedded-data block pointers do
not require DVAs to be allocated the associated vdevs will not
be marked and therefore should not be unmarked.
Ported by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2544
This commit is contained in:
committed by
Brian Behlendorf
parent
faf0f58c69
commit
9b67f60560
+33
-15
@@ -52,7 +52,7 @@
|
||||
* At random times, the child self-immolates with a SIGKILL.
|
||||
* This is the software equivalent of pulling the power cord.
|
||||
* The parent then runs the test again, using the existing
|
||||
* storage pool, as many times as desired. If backwards compatability
|
||||
* storage pool, as many times as desired. If backwards compatibility
|
||||
* testing is enabled ztest will sometimes run the "older" version
|
||||
* of ztest after a SIGKILL.
|
||||
*
|
||||
@@ -1301,13 +1301,13 @@ static void
|
||||
ztest_bt_verify(ztest_block_tag_t *bt, objset_t *os, uint64_t object,
|
||||
uint64_t offset, uint64_t gen, uint64_t txg, uint64_t crtxg)
|
||||
{
|
||||
ASSERT(bt->bt_magic == BT_MAGIC);
|
||||
ASSERT(bt->bt_objset == dmu_objset_id(os));
|
||||
ASSERT(bt->bt_object == object);
|
||||
ASSERT(bt->bt_offset == offset);
|
||||
ASSERT(bt->bt_gen <= gen);
|
||||
ASSERT(bt->bt_txg <= txg);
|
||||
ASSERT(bt->bt_crtxg == crtxg);
|
||||
ASSERT3U(bt->bt_magic, ==, BT_MAGIC);
|
||||
ASSERT3U(bt->bt_objset, ==, dmu_objset_id(os));
|
||||
ASSERT3U(bt->bt_object, ==, object);
|
||||
ASSERT3U(bt->bt_offset, ==, offset);
|
||||
ASSERT3U(bt->bt_gen, <=, gen);
|
||||
ASSERT3U(bt->bt_txg, <=, txg);
|
||||
ASSERT3U(bt->bt_crtxg, ==, crtxg);
|
||||
}
|
||||
|
||||
static ztest_block_tag_t *
|
||||
@@ -3557,6 +3557,11 @@ ztest_dsl_dataset_promote_busy(ztest_ds_t *zd, uint64_t id)
|
||||
if (error)
|
||||
fatal(0, "dmu_objset_own(%s) = %d", snap2name, error);
|
||||
error = dsl_dataset_promote(clone2name, NULL);
|
||||
if (error == ENOSPC) {
|
||||
dmu_objset_disown(os, FTAG);
|
||||
ztest_record_enospc(FTAG);
|
||||
goto out;
|
||||
}
|
||||
if (error != EBUSY)
|
||||
fatal(0, "dsl_dataset_promote(%s), %d, not EBUSY", clone2name,
|
||||
error);
|
||||
@@ -3739,11 +3744,19 @@ ztest_dmu_read_write(ztest_ds_t *zd, uint64_t id)
|
||||
return;
|
||||
}
|
||||
|
||||
dmu_object_set_checksum(os, bigobj,
|
||||
(enum zio_checksum)ztest_random_dsl_prop(ZFS_PROP_CHECKSUM), tx);
|
||||
enum zio_checksum cksum;
|
||||
do {
|
||||
cksum = (enum zio_checksum)
|
||||
ztest_random_dsl_prop(ZFS_PROP_CHECKSUM);
|
||||
} while (cksum >= ZIO_CHECKSUM_LEGACY_FUNCTIONS);
|
||||
dmu_object_set_checksum(os, bigobj, cksum, tx);
|
||||
|
||||
dmu_object_set_compress(os, bigobj,
|
||||
(enum zio_compress)ztest_random_dsl_prop(ZFS_PROP_COMPRESSION), tx);
|
||||
enum zio_compress comp;
|
||||
do {
|
||||
comp = (enum zio_compress)
|
||||
ztest_random_dsl_prop(ZFS_PROP_COMPRESSION);
|
||||
} while (comp >= ZIO_COMPRESS_LEGACY_FUNCTIONS);
|
||||
dmu_object_set_compress(os, bigobj, comp, tx);
|
||||
|
||||
/*
|
||||
* For each index from n to n + s, verify that the existing bufwad
|
||||
@@ -4867,8 +4880,13 @@ ztest_dmu_snapshot_hold(ztest_ds_t *zd, uint64_t id)
|
||||
error = dsl_dataset_user_hold(holds, 0, NULL);
|
||||
fnvlist_free(holds);
|
||||
|
||||
if (error)
|
||||
fatal(0, "dsl_dataset_user_hold(%s)", fullname, tag);
|
||||
if (error == ENOSPC) {
|
||||
ztest_record_enospc("dsl_dataset_user_hold");
|
||||
goto out;
|
||||
} else if (error) {
|
||||
fatal(0, "dsl_dataset_user_hold(%s, %s) = %u",
|
||||
fullname, tag, error);
|
||||
}
|
||||
|
||||
error = dsl_destroy_snapshot(fullname, B_FALSE);
|
||||
if (error != EBUSY) {
|
||||
@@ -5336,7 +5354,7 @@ ztest_run_zdb(char *pool)
|
||||
}
|
||||
|
||||
(void) sprintf(zdb,
|
||||
"%s -bcc%s%s -U %s %s",
|
||||
"%s -bcc%s%s -d -U %s %s",
|
||||
bin,
|
||||
ztest_opts.zo_verbose >= 3 ? "s" : "",
|
||||
ztest_opts.zo_verbose >= 4 ? "v" : "",
|
||||
|
||||
Reference in New Issue
Block a user