MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vdev_mirror_scrub_done

Function vdev_mirror_scrub_done

freebsd/contrib/openzfs/module/zfs/vdev_mirror.c:445–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443}
444
445static void
446vdev_mirror_scrub_done(zio_t *zio)
447{
448 mirror_child_t *mc = zio->io_private;
449
450 if (zio->io_error == 0) {
451 zio_t *pio;
452 zio_link_t *zl = NULL;
453
454 mutex_enter(&zio->io_lock);
455 while ((pio = zio_walk_parents(zio, &zl)) != NULL) {
456 mutex_enter(&pio->io_lock);
457 ASSERT3U(zio->io_size, >=, pio->io_size);
458 abd_copy(pio->io_abd, zio->io_abd, pio->io_size);
459 mutex_exit(&pio->io_lock);
460 }
461 mutex_exit(&zio->io_lock);
462 }
463
464 abd_free(zio->io_abd);
465
466 mc->mc_error = zio->io_error;
467 mc->mc_tried = 1;
468 mc->mc_skipped = 0;
469}
470
471/*
472 * Check the other, lower-index DVAs to see if they're on the same

Callers

nothing calls this directly

Calls 5

mutex_enterFunction · 0.85
zio_walk_parentsFunction · 0.85
abd_copyFunction · 0.85
mutex_exitFunction · 0.85
abd_freeFunction · 0.85

Tested by

no test coverage detected