]> git.proxmox.com Git - mirror_zfs.git/commit - tests/runfiles/linux.run
Release SCL_STATE in map_write_done()
authorOlaf Faaland <faaland1@llnl.gov>
Mon, 24 Jul 2017 15:48:28 +0000 (08:48 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 25 Jul 2017 16:25:05 +0000 (12:25 -0400)
commitffb195c256f8a74a87c3834258ec90c513d66adb
tree07c0c43142ed997d8d5105ca05c802a859b8cd77
parentf43615d0cc22d7db496c1291c84e64e269ca51d9
Release SCL_STATE in map_write_done()

The config lock must be held for the duration of the MMP write.
Since the I/Os are executed via map_nowait(), the done function
is the only place where we know the write has completed.

Since SCL_STATE is taken as reader, overlapping I/Os do not
create a deadlock.  The refcount is simply increased when new
I/Os are queued and decreased when I/Os complete.

Test case added which exercises the probe IO call path to
verify the fix and prevent a regression.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #6394
module/zfs/mmp.c
tests/runfiles/linux.run
tests/zfs-tests/tests/functional/mmp/Makefile.am
tests/zfs-tests/tests/functional/mmp/mmp_write_uberblocks.ksh [new file with mode: 0755]