Files
mirror_zfs/tests/zfs-tests/cmd
Brian Behlendorf 664d487a5d 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-05 08:08:55 -07:00
..
2016-03-16 13:46:16 -07:00
2021-04-07 13:27:11 -07:00
2016-03-16 13:46:16 -07:00
2017-05-22 12:34:32 -04:00
2021-04-07 13:27:11 -07:00
2020-06-09 21:24:09 -07:00
2019-12-18 12:29:43 -08:00
2019-12-18 12:29:43 -08:00
2017-05-22 12:34:32 -04:00
2020-07-10 14:26:00 -07:00
2021-01-20 21:27:30 -08:00
2016-03-16 13:46:16 -07:00
2016-03-16 13:46:16 -07:00
2019-06-19 09:48:12 -07:00
2016-03-16 13:46:16 -07:00
2017-05-22 12:34:32 -04:00