Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions module/os/linux/zfs/zfs_vnops_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -3672,8 +3672,17 @@ zfs_link(znode_t *tdzp, znode_t *szp, char *name, cred_t *cr,
if (!is_tmpfile && zfsvfs->z_os->os_sync == ZFS_SYNC_ALWAYS)
zil_commit(zilog, 0);

if (is_tmpfile && zfsvfs->z_os->os_sync != ZFS_SYNC_DISABLED)
txg_wait_synced(dmu_objset_pool(zfsvfs->z_os), txg);
if (is_tmpfile && zfsvfs->z_os->os_sync != ZFS_SYNC_DISABLED) {
txg_wait_flag_t wait_flags =
spa_get_failmode(dmu_objset_spa(zfsvfs->z_os)) ==
ZIO_FAILURE_MODE_CONTINUE ? TXG_WAIT_SUSPEND : 0;
error = txg_wait_synced_flags(dmu_objset_pool(zfsvfs->z_os),
txg, wait_flags);
if (error != 0) {
ASSERT3U(error, ==, ESHUTDOWN);
error = SET_ERROR(EIO);
}
}

zfs_znode_update_vfs(tdzp);
zfs_znode_update_vfs(szp);
Expand Down
14 changes: 11 additions & 3 deletions module/zfs/zfs_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1805,9 +1805,17 @@ zfs_clone_range(znode_t *inzp, uint64_t *inoffp, znode_t *outzp,
* fallback, or wait for the next TXG and check again.
*/
if (error == EAGAIN && zfs_bclone_wait_dirty) {
txg_wait_synced(dmu_objset_pool(inos),
last_synced_txg + 1);
continue;
txg_wait_flag_t wait_flags =
spa_get_failmode(dmu_objset_spa(inos)) ==
ZIO_FAILURE_MODE_CONTINUE ?
TXG_WAIT_SUSPEND : 0;
error = txg_wait_synced_flags(
dmu_objset_pool(inos), last_synced_txg + 1,
wait_flags);
if (error == 0)
continue;
ASSERT3U(error, ==, ESHUTDOWN);
error = SET_ERROR(EIO);
Comment thread
robn marked this conversation as resolved.
}

break;
Expand Down