Skip to content

Commit

Permalink
Remove unused check from dmu_tx_count_write()
Browse files Browse the repository at this point in the history
Individual transactions may not be larger than DMU_MAX_ACCESS.
This is enforced by the assertions in dmu_tx_hold_write() and
dmu_tx_hold_write_by_dnode().  There's an additional check in
dmu_tx_count_write() however it has no effect and only sets a
local err variable.  We could enable this check, however since
it's already enforced by ASSERTs elsewhere I opted to remove it
instead.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3731 
Closes #11384
  • Loading branch information
behlendorf authored Dec 22, 2020
1 parent af95939 commit 0c763f7
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions module/zfs/dmu_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,6 @@ dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)

(void) zfs_refcount_add_many(&txh->txh_space_towrite, len, FTAG);

if (zfs_refcount_count(&txh->txh_space_towrite) > 2 * DMU_MAX_ACCESS)
err = SET_ERROR(EFBIG);

if (dn == NULL)
return;

Expand Down

0 comments on commit 0c763f7

Please sign in to comment.