]> git.proxmox.com Git - mirror_zfs.git/commitdiff
OpenZFS 6940 - Cannot unlink directories when over quota
authorSimon Klinkert <simon.klinkert@gmail.com>
Tue, 30 Aug 2016 13:03:05 +0000 (15:03 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 30 Aug 2016 21:33:04 +0000 (14:33 -0700)
From user perspective, I would expect that ZFS is always able
to remove files and directories even when the quota is exceeded.

Authored by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: kernelOfTruth kerneloftruth@gmail.com
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
OpenZFS-issue: https://www.illumos.org/issues/6940
OpenZFS-issue: https://www.illumos.org/issues/6334
OpenZFS-commit: https://github.com/illumos/illumos-gate/commit/9918916
Closes #5044

module/zfs/zfs_vnops.c

index 707a2111494351e5e25be40a53dd30b3f37c5c8e..82016af750497f6defcdccd0a0cb4596d403c3ae 100644 (file)
@@ -2003,6 +2003,7 @@ top:
        dmu_tx_hold_zap(tx, zsb->z_unlinkedobj, FALSE, NULL);
        zfs_sa_upgrade_txholds(tx, zp);
        zfs_sa_upgrade_txholds(tx, dzp);
+       dmu_tx_mark_netfree(tx);
        error = dmu_tx_assign(tx, waited ? TXG_WAITED : TXG_NOWAIT);
        if (error) {
                rw_exit(&zp->z_parent_lock);