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
This commit is contained in:
Brian Behlendorf
2017-09-13 16:04:16 -07:00
committed by Tony Hutter
parent 45d1abc74d
commit a2a0440918
13 changed files with 223 additions and 43 deletions
+1
View File
@@ -36,6 +36,7 @@ export SYSTEM_FILES='arp
egrep
exportfs
expr
fallocate
false
fdisk
file
+1 -1
View File
@@ -140,7 +140,7 @@ function ismounted
[[ "$1" == "$dir" || "$1" == "$name" ]] && return 0
;;
ext2)
ext*)
out=$(df -t $fstype $1 2>/dev/null)
return $?
;;