mirror_zfs/include/os/linux/zfs/sys
Brian Behlendorf de198f2d95
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-07 14:27:44 -07:00
..
Makefile.am Share zfs_fsync, zfs_read, zfs_write, et al between Linux and FreeBSD 2020-10-21 14:08:06 -07:00
policy.h Share zfs_fsync, zfs_read, zfs_write, et al between Linux and FreeBSD 2020-10-21 14:08:06 -07:00
sha2.h Move sha2.h to platform code 2019-10-31 15:45:58 -07:00
trace_acl.h G/C struct znode -> z_moved 2020-11-10 12:42:47 -08:00
trace_arc.h Fix/improve dbuf hits accounting 2021-08-17 09:50:31 -06:00
trace_common.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_dbgmsg.h Enable use of DTRACE_PROBE* macros in "spl" module 2019-11-01 13:13:43 -07:00
trace_dbuf.h Factor out some dbuf subroutines and add state change tracing 2020-02-18 11:21:37 -08:00
trace_dmu.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_dnode.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_multilist.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_rrwlock.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_txg.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_vdev.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_zfs.h Enable use of DTRACE_PROBE* macros in "spl" module 2019-11-01 13:13:43 -07:00
trace_zil.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_zio.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
trace_zrlock.h OpenZFS restructuring - move linux tracing code to platform directories 2019-09-11 14:25:53 -07:00
zfs_bootenv_os.h zfs label bootenv should store data as nvlist 2020-09-15 15:42:27 -07:00
zfs_context_os.h Use fallthrough macro 2021-09-14 10:17:54 -06:00
zfs_ctldir.h Throw const on some strings 2020-10-02 17:44:10 -07:00
zfs_dir.h Eliminate Linux specific inode usage from common code 2019-12-11 11:53:57 -08:00
zfs_vfsops_os.h Remove unimplemented virus scanning hooks 2021-05-10 22:02:25 -07:00
zfs_vnops_os.h Linux 5.12 compat: idmapped mounts 2021-03-19 21:00:59 -07:00
zfs_znode_impl.h Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency 2021-11-07 14:27:44 -07:00
zpl.h Linux 5.15 compat: get_acl() 2021-09-09 09:38:35 -07:00