mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-30 21:09:38 +03:00
de198f2d95
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 <mahrens@delphix.com> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Rich Ercolani <rincebrain@gmail.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #11900 Closes #12724
39 lines
515 B
Makefile
39 lines
515 B
Makefile
EXTRA_DIST = file_common.h
|
|
|
|
SUBDIRS = \
|
|
badsend \
|
|
btree_test \
|
|
chg_usr_exec \
|
|
devname2devid \
|
|
dir_rd_update \
|
|
draid \
|
|
file_check \
|
|
file_trunc \
|
|
file_write \
|
|
get_diff \
|
|
largest_file \
|
|
libzfs_input_check \
|
|
mkbusy \
|
|
mkfile \
|
|
mkfiles \
|
|
mktree \
|
|
mmap_exec \
|
|
mmap_libaio \
|
|
mmap_seek \
|
|
mmapwrite \
|
|
nvlist_to_lua \
|
|
randwritecomp \
|
|
readmmap \
|
|
rename_dir \
|
|
rm_lnkcnt_zero_file \
|
|
send_doall \
|
|
stride_dd \
|
|
threadsappend
|
|
|
|
if BUILD_LINUX
|
|
SUBDIRS += \
|
|
randfree_file \
|
|
user_ns_exec \
|
|
xattrtest
|
|
endif
|