Skip to content

Commit

Permalink
[vpsAdminOS] change zfs_dmu_offset_next_sync=0 behavior
Browse files Browse the repository at this point in the history
For SEEK_DATA/SEEK_HOLE, act like the file is non-sparse.

Signed-off-by: Pavel Snajdr <snajpa@snajpa.net>
  • Loading branch information
snajpa committed Aug 29, 2023
1 parent f4e50f6 commit 9e43766
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion module/zfs/dmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2194,7 +2194,10 @@ dmu_offset_next(objset_t *os, uint64_t object, boolean_t hole, uint64_t *off)
goto restart;
}

err = SET_ERROR(EBUSY);
if (hole)
*off = file_sz;
else
err = SET_ERROR(EBUSY);
} else {
err = dnode_next_offset(dn, DNODE_FIND_HAVELOCK |
(hole ? DNODE_FIND_HOLE : 0), off, 1, 1, 0);
Expand Down

0 comments on commit 9e43766

Please sign in to comment.