]> granicus.if.org Git - zfs/commit
Fix volume WR_INDIRECT log replay (#6620)
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 13 Sep 2017 23:04:16 +0000 (16:04 -0700)
committerTony Hutter <hutter2@llnl.gov>
Wed, 13 Sep 2017 23:04:16 +0000 (16:04 -0700)
commita2a04409185efc3e90aa9b8f16ace49190f01f4b
tree6ebc6a2d9152bb8b5392037f5b52ca57631b0709
parent45d1abc74d6bd4b09c573dd8db0d2571eb82220d
Fix volume WR_INDIRECT log replay (#6620)

The portion of the zvol_replay_write() handler responsible for
replaying indirect log records for some reason never existed.
As a result indirect log records were not being correctly replayed.

This went largely unnoticed since the majority of zvol log records
were of the type WR_COPIED or WR_NEED_COPY prior to OpenZFS 7578.

This patch updates zvol_replay_write() to correctly handle these
log records and adds a new test case which verifies volume replay
to prevent any regression.  The existing test case which verified
replay on filesystem was renamed slog_replay_fs.ksh for clarity.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6603
13 files changed:
module/zfs/zvol.c
scripts/zfs-tests.sh
tests/runfiles/linux.run
tests/zfs-tests/include/commands.cfg
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/cli_root/zfs_copies/cleanup.ksh
tests/zfs-tests/tests/functional/cli_root/zfs_rollback/zfs_rollback_common.kshlib
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create.shlib
tests/zfs-tests/tests/functional/slog/Makefile.am
tests/zfs-tests/tests/functional/slog/setup.ksh
tests/zfs-tests/tests/functional/slog/slog_replay_fs.ksh [moved from tests/zfs-tests/tests/functional/slog/slog_015_pos.ksh with 89% similarity]
tests/zfs-tests/tests/functional/slog/slog_replay_volume.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/xattr/xattr_004_pos.ksh