]> granicus.if.org Git - zfs/commit
Fix out-of-order ZIL txtype lost on hardlinked files
authorChunwei Chen <david.chen@nutanix.com>
Wed, 14 Aug 2019 03:21:27 +0000 (20:21 -0700)
committerTony Hutter <hutter2@llnl.gov>
Wed, 25 Sep 2019 18:27:50 +0000 (11:27 -0700)
commit569f5d5d0543a1f1f4958a65fafc3eb7bf1778d1
tree9c60dcc9af02ea46f66cd3b928dd916ed056720d
parent6d1599c1e1d1fabb14eb27f8f28d3c6b539f3fdc
Fix out-of-order ZIL txtype lost on hardlinked files

We should only call zil_remove_async when an object is removed. However,
in current implementation, it is called whenever TX_REMOVE is called. In
the case of hardlinked file, every unlink will generate TX_REMOVE and
causing operations to be dropped even when the object is not removed.

We fix this by only calling zil_remove_async when the file is fully
unlinked.

Reviewed-by: George Wilson <gwilson@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Closes #8769
Closes #9061
include/sys/zfs_znode.h
module/zfs/zfs_log.c
module/zfs/zfs_vnops.c
module/zfs/zil.c
tests/zfs-tests/tests/functional/slog/slog_replay_fs.ksh