mirror_zfs/cmd
Brian Behlendorf 48ce292ea0
Clarify and restrict dmu_tx_assign() errors
There are three possible cases where dmu_tx_assign() may
encounter a fatal error.  When there is a true lack of free
space (ENOSPC), when there is a lack of quota space (EDQUOT),
or when data required to perform the transaction cannot be
read from disk (EIO).  See the dmu_tx_check_ioerr() function
for additional details of on the motivation for check for
I/O error early.

Prior to this change dmu_tx_assign() would return the
contents of tx->tx_err which covered a wide range of possible
error codes (EIO, ECKSUM, ESRCH, etc).  In practice, none
of the callers could do anything useful with this level of
detail and simply returned the error.

Therefore, this change converts all tx->tx_err errors to EIO,
adds ASSERTs to dmu_tx_assign() to cover the only possible
errors, and clarifies the function comment to include EIO as
a possible fatal error.

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Brian D Behlendorf <behlendo@slag12.llnl.gov>
Closes #17463
2025-06-23 15:48:30 -04:00
..
raidz_test SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zdb Make ganging redundancy respect redundant_metadata property (#17073) 2025-03-19 15:58:29 -07:00
zed Fixed zfs_notify_email for programs like sendmail 2025-04-12 11:58:19 -04:00
zfs Introduce zfs rewrite subcommand (#17246) 2025-05-12 10:22:17 -07:00
zinject Multiple printf() size fixes (#17199) 2025-04-01 15:27:03 -07:00
zpool zpool: clarify ZPOOL_STATUS_REMOVED_DEV status message 2025-05-30 09:15:10 -07:00
zpool_influxdb SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zstream SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
arc_summary SPDX: license tags: BSD-2-Clause 2025-03-13 17:56:46 -07:00
arcstat.in arcstat: prevent ZeroDivisionError when L2ARC becomes empty 2025-05-19 16:27:24 -07:00
dbufstat.in SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
fsck.zfs.in cmd: move single-file binaries up, extract udev programs to udev/ 2022-05-10 10:20:34 -07:00
Makefile.am build: rename FORCEDEBUG_CPPFLAGS to LIBZPOOL_CPPFLAGS 2024-08-27 12:53:27 -07:00
mount_zfs.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zfs_ids_to_path.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zgenhostid.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zhack.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
zilstat.in SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
ztest.c Clarify and restrict dmu_tx_assign() errors 2025-06-23 15:48:30 -04:00
zvol_wait zvol_wait logic may terminate prematurely 2022-10-11 12:12:04 -07:00