diff options
author | Brian Behlendorf <[email protected]> | 2021-11-07 13:27:44 -0800 |
---|---|---|
committer | Tony Hutter <[email protected]> | 2021-11-05 08:08:55 -0700 |
commit | 664d487a5dbd758216ac613934a4080fcc1de347 (patch) | |
tree | ecd0b7b292537ca1525155439e4fc3433a199a0e /configure.ac | |
parent | 5bf81fea2f899520f2015d2982072f64b7428f71 (diff) |
Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency
When using lseek(2) to report data/holes memory mapped regions of
the file were ignored. This could result in incorrect results.
To handle this zfs_holey_common() was updated to asynchronously
writeback any dirty mmap(2) regions prior to reporting holes.
Additionally, while not strictly required, the dn_struct_rwlock is
now held over the dirty check to prevent the dnode structure from
changing. This ensures that a clean dnode can't be dirtied before
the data/hole is located. The range lock is now also taken to
ensure the call cannot race with zfs_write().
Furthermore, the code was refactored to provide a dnode_is_dirty()
helper function which checks the dnode for any dirty records to
determine its dirtiness.
Reviewed-by: Matthew Ahrens <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Rich Ercolani <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #11900
Closes #12724
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 6f34b210d..ebc7b276a 100644 --- a/configure.ac +++ b/configure.ac @@ -221,6 +221,7 @@ AC_CONFIG_FILES([ tests/zfs-tests/cmd/mktree/Makefile tests/zfs-tests/cmd/mmap_exec/Makefile tests/zfs-tests/cmd/mmap_libaio/Makefile + tests/zfs-tests/cmd/mmap_seek/Makefile tests/zfs-tests/cmd/mmapwrite/Makefile tests/zfs-tests/cmd/nvlist_to_lua/Makefile tests/zfs-tests/cmd/randfree_file/Makefile |