diff options
author | Alexander Motin <[email protected]> | 2023-08-24 20:08:49 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2023-08-24 17:08:49 -0700 |
commit | eda3fcd56ff9f46dd606c48331cb786856f37fe3 (patch) | |
tree | 926dd2c96a321a80b8c176a249c7e2c7edb59c6b /cmd/raidz_test/raidz_test.c | |
parent | 11fbcacf37d1a66c7a40bb8920c70ce9a87270ea (diff) |
ZIL: Second attempt to reduce scope of zl_issuer_lock.
The previous patch #14841 appeared to have significant flaw, causing
deadlocks if zl_get_data callback got blocked waiting for TXG sync. I
already handled some of such cases in the original patch, but issue
#14982 shown cases that were impossible to solve in that design.
This patch fixes the problem by postponing log blocks allocation till
the very end, just before the zios issue, leaving nothing blocking after
that point to cause deadlocks. Before that point though any sleeps are
now allowed, not causing sync thread blockage. This require slightly
more complicated lwb state machine to allocate blocks and issue zios
in proper order. But with removal of special early issue workarounds
the new code is much cleaner now, and should even be more efficient.
Since this patch uses null zios between write, I've found that null
zios do not wait for logical children ready status in zio_ready(),
that makes parent write to proceed prematurely, producing incorrect
log blocks. Added ZIO_CHILD_LOGICAL_BIT to zio_wait_for_children()
fixes it.
Reviewed-by: Rob Norris <[email protected]>
Reviewed-by: Mark Maybee <[email protected]>
Reviewed-by: George Wilson <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored by: iXsystems, Inc.
Closes #15122
Diffstat (limited to 'cmd/raidz_test/raidz_test.c')
0 files changed, 0 insertions, 0 deletions