]> 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)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 14 Aug 2019 03:21:27 +0000 (21:21 -0600)
commit8e556c5ebc7b66caf2cdcc561b6644f9f8437a6d
tree2f2ba8596005f0c42696cc44208633f0a719ebfb
parent475ebd763a7bc963b64118c22244cb0cd795d778
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