mirror_zfs/include/os/freebsd/spl/sys
Brian Behlendorf a524f8d6af 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 <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
2021-11-12 16:31:55 -08:00
..
acl_impl.h
acl.h
atomic.h
byteorder.h
callb.h
ccompat.h
ccompile.h
cmn_err.h
condvar.h
console.h
cred.h
ctype.h
debug.h
dirent.h
disp.h
dkio.h
extdirent.h
fcntl.h
file.h
freebsd_rwlock.h
idmap.h
inttypes.h
isa_defs.h
kidmap.h
kmem_cache.h
kmem.h
kstat.h
list_impl.h
list.h
lock.h
Makefile.am
misc.h
mod_os.h
mode.h
mount.h
mutex.h
param.h
policy.h
proc.h
processor.h
procfs_list.h
random.h
rwlock.h
sdt.h
sid.h
sig.h
simd_x86.h
simd.h
spl_condvar.h
string.h
strings.h
sunddi.h
sysmacros.h
systeminfo.h
systm.h
taskq.h
thread.h
time.h
timer.h
trace_zfs.h
trace.h
types32.h
types.h
uio.h Cleaning up uio headers 2021-11-12 16:31:55 -08:00
uuid.h
vfs.h
vm.h
vmsystm.h
vnode_impl.h
vnode.h Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency 2021-11-12 16:31:55 -08:00
zmod.h
zone.h