diff options
author | delphij <delphij@FreeBSD.org> | 2014-07-23 00:35:06 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-07-23 00:35:06 +0000 |
commit | ffc18ded5bc79502d527f9ff35220d2a5e579225 (patch) | |
tree | bf62623a34aeeb725ec83c3dca937146ba6420fa /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | |
parent | dc97077d62c55c6f91988f073e9e645c3eb7a5ee (diff) | |
download | FreeBSD-src-ffc18ded5bc79502d527f9ff35220d2a5e579225.zip FreeBSD-src-ffc18ded5bc79502d527f9ff35220d2a5e579225.tar.gz |
MFC r268464: MFV r268452:
Explicitly mark file removal transactions as "presumed to result
in a net free of space" so they will not fail with ENOSPC.
Illumos issue: 4950 files sometimes can't be removed from a full
filesystem
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c index fa607e1..20480d1 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c @@ -852,6 +852,7 @@ zvol_update_volsize(objset_t *os, uint64_t volsize) tx = dmu_tx_create(os); dmu_tx_hold_zap(tx, ZVOL_ZAP_OBJ, TRUE, NULL); + dmu_tx_mark_netfree(tx); error = dmu_tx_assign(tx, TXG_WAIT); if (error) { dmu_tx_abort(tx); @@ -1988,6 +1989,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t arg, int flag, cred_t *cr, int *rvalp) rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length, RL_WRITER); tx = dmu_tx_create(zv->zv_objset); + dmu_tx_mark_netfree(tx); error = dmu_tx_assign(tx, TXG_WAIT); if (error != 0) { dmu_tx_abort(tx); |