Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
9485 Optimize possible split block search space
Browse files Browse the repository at this point in the history
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Tim Chase <tim@chase2k.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>

Remove duplicate segment copies to minimize the possible search
space for reconstruction.  Once reduced an accurate assessment can
be made regarding the difficulty in reconstructing the block.

Also, ztest will now run zdb with
zfs_reconstruct_indirect_combinations_max set to 1000000 in an attempt
to avoid checksum errors.

Closes #625
  • Loading branch information
behlendorf authored and prakashsurya committed Feb 18, 2019
1 parent d9df47d commit 18efce4
Show file tree
Hide file tree
Showing 2 changed files with 308 additions and 101 deletions.
11 changes: 10 additions & 1 deletion usr/src/cmd/ztest/ztest.c
Expand Up @@ -196,6 +196,7 @@ extern boolean_t zfs_compressed_arc_enabled;
extern boolean_t zfs_abd_scatter_enabled;
extern int dmu_object_alloc_chunk_shift;
extern boolean_t zfs_force_some_double_word_sm_entries;
extern unsigned long zfs_reconstruct_indirect_damage_fraction;

static ztest_shared_opts_t *ztest_shared_opts;
static ztest_shared_opts_t ztest_opts;
Expand Down Expand Up @@ -5700,7 +5701,8 @@ ztest_run_zdb(char *pool)
isa = strdup(isa);
/* LINTED */
(void) sprintf(bin,
"/usr/sbin%.*s/zdb -bcc%s%s -G -d -U %s %s",
"/usr/sbin%.*s/zdb -bcc%s%s -G -d -U %s "
"-o zfs_reconstruct_indirect_combinations_max=65536 %s",
isalen,
isa,
ztest_opts.zo_verbose >= 3 ? "s" : "",
Expand Down Expand Up @@ -6652,6 +6654,13 @@ main(int argc, char **argv)
*/
zfs_force_some_double_word_sm_entries = B_TRUE;

/*
* Verify that even extensively damaged split blocks with many
* segments can be reconstructed in a reasonable amount of time
* when reconstruction is known to be possible.
*/
zfs_reconstruct_indirect_damage_fraction = 4;

ztest_fd_rand = open("/dev/urandom", O_RDONLY);
ASSERT3S(ztest_fd_rand, >=, 0);

Expand Down

0 comments on commit 18efce4

Please sign in to comment.