From d09dc5980c3e4840352c3c7b575975cbb72e7270 Mon Sep 17 00:00:00 2001 From: DeHackEd Date: Sun, 16 Feb 2020 15:44:08 -0500 Subject: [PATCH] Honour sync=disabled when relinking tpmfiles Unlinked files don't respect synchronous flush commands, but when they get relinked their state is unknown. Previously we force flushed all such files even when sync=disabled. Correct this case. Reviewed-by: Chunwei Chen Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: DHE Closes #10005 --- module/os/linux/zfs/zfs_vnops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/os/linux/zfs/zfs_vnops.c b/module/os/linux/zfs/zfs_vnops.c index 406cd7ef22..ec870957ff 100644 --- a/module/os/linux/zfs/zfs_vnops.c +++ b/module/os/linux/zfs/zfs_vnops.c @@ -4431,7 +4431,7 @@ top: if (!is_tmpfile && zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS) zil_commit(zilog, 0); - if (is_tmpfile) + if (is_tmpfile && zfsvfs->z_os->os_sync != ZFS_SYNC_DISABLED) txg_wait_synced(dmu_objset_pool(zfsvfs->z_os), txg); zfs_inode_update(tdzp);