HomeFreeBSD

ZFS replay transaction error 5

Description

ZFS replay transaction error 5

When zfs_replay_write() replays TX_WRITE records from ZIL
it calls zpl_write_common() to perform the actual write.
zpl_write_common() returns the number of bytes written
(similar to write() system call) or an (negative) error.
However, the code expects the positive return value to be
a residual counter. Thus when zpl_write_common() successfully
completes it is mistakenly considered to be a partial write and
the error code delivered further. At this point the ZIL processing
is aborted with famous "ZFS replay transaction error 5" error
message given to the message buffer.

The fix is to compare the zpl_write_commmon() return value with
the buffer size and flag error only when they disagree.

Signed-off-by: Cyril Plisko <cyril.plisko@mountall.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #933

Details

Provenance
Cyril Plisko <cyril.plisko@mountall.com>Authored on Sep 13 2012, 8:25 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 17 2012, 6:06 PM
Parents
rG8312c6df55c1: Clear PG_writeback for sync I/O error case
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG49d39798f286: ZFS replay transaction error 5 (authored by Cyril Plisko <cyril.plisko@mountall.com>).Sep 17 2012, 6:06 PM