I filed https://www.illumos.org/issues/11051 with a summary of what I've discovered.

On 05/19/19 13:09, Igor Kozhukhov wrote:
add openzfs dev list where it can be interested to ZoL and others too.
i think it is additional issue what was fixed by Tom Caputi with scrub.

-Igor

On May 19, 2019, at 9:53 PM, Bill Sommerfeld <[email protected]> wrote:

On 05/18/19 14:27, Jerry Jelinek wrote:
I’ll see if I can reproduce this and I’ll also spend some time looking at the 
code to see if I can spot anything.

I've figured out how to reproduce it.   It doesn't appear to happen with 
compress=lz4 for reasons I haven't yet figured out but it's easy to reproduce 
by creating a bunch of very short random files in a filesystem using either 
compress=zle or compress=lzjb.  (I haven't tried others).

0) use a pool with embedded_data enabled.

1) use a compression algorithm other than lz4:

zfs set compress=lzjb path/to/filesys

2) create a bunch of small files with random content:

cd /path/to/filesys

for f in $(seq 1024)
do
dd if=/dev/urandom of=$f bs=16 count=1
done

3) scrub, watch "issued" value go nuts when the scan reaches the embedded bp's 
containing the above files.

I'm convinced it's the BP_IS_EMBEDDED() thing and it appears it can be fixed by:

diff --git a/usr/src/uts/common/fs/zfs/dsl_scan.c 
b/usr/src/uts/common/fs/zfs/dsl_scan.c
index ca82195178..b15b0931ed 100644
--- a/usr/src/uts/common/fs/zfs/dsl_scan.c
+++ b/usr/src/uts/common/fs/zfs/dsl_scan.c
@@ -3431,6 +3431,9 @@ count_block(dsl_scan_t *scn, zfs_all_blkstats_t *zab, 
const blkptr_t *bp)
{
        int i;

+       if (BP_IS_EMBEDDED(bp))
+               return;
+
        /*
         * Update the spa's stats on how many bytes we have issued.
         * Sequential scrubs create a zio for each DVA of the bp. Each


------------------------------------------
illumos: illumos-developer
Permalink: 
https://illumos.topicbox.com/groups/developer/Tffb445a29bb4df78-Ma289ded49b5ef5e16132cb26
Delivery options: https://illumos.topicbox.com/groups/developer/subscription


------------------------------------------
openzfs: openzfs-developer
Permalink: 
https://openzfs.topicbox.com/groups/developer/T3a803f548745e82d-M1f7e768f00a18004fa5b1c8c
Delivery options: https://openzfs.topicbox.com/groups/developer/subscription

Reply via email to