svn commit: r302650 - vendor-sys/illumos/dist/uts/common/fs/zfs

Andriy Gapon avg at FreeBSD.org
Tue Jul 12 11:36:23 UTC 2016


Author: avg
Date: Tue Jul 12 11:36:22 2016
New Revision: 302650
URL: https://svnweb.freebsd.org/changeset/base/302650

Log:
  6940 Cannot unlink directories when over quota
  
  illumos/illumos-gate at 99189164df06057fb968ca7be701bb1a0d5da8c9
  https://github.com/illumos/illumos-gate/commit/99189164df06057fb968ca7be701bb1a0d5da8c9
  
  https://www.illumos.org/issues/6940
    Similar to #6334, but this time with empty directories:
    $ zfs create tank/quota
    $ zfs set quota=10M tank/quota
    $ zfs snapshot tank/quota at snap1
    $ zfs set mountpoint=/mnt/tank/quota tank/quota
    $ mkdir /mnt/tank/quota/dir # create an empty directory
    $ mkfile 11M /mnt/tank/quota/11M
    /mnt/tank/quota/11M: initialized 9830400 of 11534336 bytes: Disc quota exceeded
    $ rmdir /mnt/tank/quota/dir # now unlink the empty directory
    rmdir: directory "/mnt/tank/quota/dir": Disc quota exceeded
    From user perspective, I would expect that ZFS is always able to remove files
    and directories even when the quota is exceeded.
  
  Reviewed by: Dan McDonald <danmcd at omniti.com>
  Reviewed by: Matthew Ahrens <mahrens at delphix.com>
  Approved by: Robert Mustacchi <rm at joyent.com>
  Author: Simon Klinkert <simon.klinkert at gmail.com>

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c	Tue Jul 12 11:35:07 2016	(r302649)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_vnops.c	Tue Jul 12 11:36:22 2016	(r302650)
@@ -2112,6 +2112,7 @@ top:
 	dmu_tx_hold_zap(tx, zfsvfs->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);


More information about the svn-src-all mailing list