HomeFreeBSD

Fix suspend Godfather I/Os io_reexecute bits

Description

Fix suspend Godfather I/Os io_reexecute bits

After resuming a pool the godfather zio could have both the
ZIO_REEXECUTE_NOW and ZIO_REEXECUTE_SUSPEND bits set. This
can occur if some child zios set ZIO_REEXECUTE_NOW while
other set ZIO_REEXECUTE_SUSPEND. The godfather zio can
inherit both flags in zio_notify_parent().

The child zios which assigned the ZIO_REEXECUTE_SUSPEND flag
will be removed from the godfather's child list and added to
the spa->spa_suspend_zio_root child list. While child zios
with the ZIO_REEXECUTE_NOW bit set remain being monitored
by the godfather zio.

When the godfather zio executes zio_done() the presence of
the ZIO_REEXECUTE_SUSPEND bit results in all io_reexecute
being cleared. These child zios will then not be re-executed
and instead will be destroyed and lost.

The most straight forward way to address this situation is
to only clear the ZIO_REEXECUTE_SUSPEND bit and leave the
ZIO_REEXECUTE_NOW bit set.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: yuxiang <guo.yong33@zte.com.cn>

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jan 28 2017, 8:13 PM
GitHub <noreply@github.com>Committed on Jan 28 2017, 8:13 PM
Parents
rG3130b84e9471: Add -Wno-declaration-after-statement to KERNELCPPFLAGS
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGa32494d22ac2: Fix suspend Godfather I/Os io_reexecute bits (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jan 28 2017, 8:13 PM