zfs/cmd
Chunwei Chen 296a4a369b
Fix zfs_get_data access to files with wrong generation
If TX_WRITE is create on a file, and the file is later deleted and a new
directory is created on the same object id, it is possible that when
zil_commit happens, zfs_get_data will be called on the new directory.
This may result in panic as it tries to do range lock.

This patch fixes this issue by record the generation number during
zfs_log_write, so zfs_get_data can check if the object is valid.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@nutanix.com>
Closes #10593
Closes #11682
2021-03-19 22:53:31 -07:00
..
arc_summary arc_summary3: Handle overflowing value width 2020-12-11 10:29:53 -08:00
arcstat FreeBSD: Update usage of py-sysctl 2020-12-10 15:28:31 -08:00
dbufstat dbufstat: Fix warnings with Python 3.8 2020-12-23 15:10:35 -08:00
fsck_zfs Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
mount_zfs cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
raidz_test Clean up RAIDZ/DRAID ereport code 2021-03-19 16:22:10 -07:00
vdev_id vdev_id: Create symlinks even if no /dev/mapper/ 2021-03-08 08:43:30 -08:00
zdb Add zdb -r <dataset> <object-id | file> <output> 2021-01-27 21:36:01 -08:00
zed Fixed issue with processing of EC_dev_remove event 2021-02-05 08:30:50 -08:00
zfs Fix report_mount_progress never calling set_progress_header 2021-02-18 13:53:05 -08:00
zfs_ids_to_path cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zgenhostid cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zhack cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zinject cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zpool zpool import cachefile improvements 2021-03-12 15:42:27 -08:00
zpool_influxdb cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zstream Suppress cppcheck invalidSyntax warninigs 2021-03-05 17:56:35 -08:00
zstreamdump Minor `zstream redup` command fixes 2020-04-10 21:10:09 -07:00
ztest Fix zfs_get_data access to files with wrong generation 2021-03-19 22:53:31 -07:00
zvol_id cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
zvol_wait zvol_wait should ignore redacted zvols 2019-11-06 10:51:19 -08:00
Makefile.am cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00