From owner-freebsd-fs@FreeBSD.ORG Sun Nov 11 16:18:26 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5B347AD for ; Sun, 11 Nov 2012 16:18:26 +0000 (UTC) (envelope-from bryan@shatow.net) Received: from secure.xzibition.com (secure.xzibition.com [173.160.118.92]) by mx1.freebsd.org (Postfix) with ESMTP id ED1808FC57 for ; Sun, 11 Nov 2012 16:18:22 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=shatow.net; h=message-id :date:from:mime-version:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; q=dns; s=sweb; b=y31H6y ke9gWBGa1fB3X3eYBIA9M2T8ZMxjT/ROKI4KrehJ0RprgWkwHxYvneFkRsF+qZEN YEawu5ZshpFRtzqGmisO0yp8k+IRgNv7uh50+2lfzzIEJVXh1OzLMmMLPJYgLkBh KTtIeUe9NFXa+PaE6u5HUZrum31IWjXnrbuEg= DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=shatow.net; h=message-id :date:from:mime-version:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; s=sweb; bh=cL00LMlTz3e/ SX6diedr5rVwmVjEpBJIYgcrsSuaLV8=; b=wp8tJBEwWiXef66sML0X7ieE0OMd eqS6087jlMqG9IiDVcnSBr/o0jcJtO/vZ3U0lStWyBgXGQw3nCw51kdBUfbYy4ZU ovmoN63pQOMuzvuaXWbsIL+Fv3jgg2gBBEKYnKD6RHo57RECU6UeTNKj6qFgpAeH SZDUjaGdOnlcJeo= Received: (qmail 41899 invoked from network); 11 Nov 2012 10:18:21 -0600 Received: from unknown (HELO ?10.10.0.115?) (bryan@shatow.net@10.10.0.115) by sweb.xzibition.com with ESMTPA; 11 Nov 2012 10:18:21 -0600 Message-ID: <509FCFCC.8030607@shatow.net> Date: Sun, 11 Nov 2012 10:18:20 -0600 From: Bryan Drewery User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 CC: freebsd-fs@freebsd.org Subject: Re: ZFS can't delete files when over quota References: <509E79C7.10300@shatow.net> <509EA942.9060801@shatow.net> <20121110194759.GA19081@dft-labs.eu> <20121110210317.GC19081@dft-labs.eu> In-Reply-To: X-Enigmail-Version: 1.4.5 OpenPGP: id=3C9B0CF9; url=http://www.shatow.net/bryan/bryan.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Nov 2012 16:18:26 -0000 On 11/10/2012 5:06 PM, Steven Hartland wrote: > ----- Original Message ----- From: "Garrett Cooper" >>> Except this is not about being unable to rm because of EDQUOT (whether >>> ZFS can do something about that or not I have no idea). This is about >>> being >>> able to remove just after truncation, which clearly shows that zfs >>> can in >>> principle remove this file on its own. >>> >> >> You're probably right. My guess is that the fix would be to ignore >> EDQUOT in the unlink VOP handler. > > The CoW nature of ZFS causes this issue, which is why UFS doesn't have this > problem. Unfortunately given ZFS's snapshots there's no guarantee that > truncating the file will result in enough free space to perform the unlink. > > Regards > Steve > This is what I was initially thinking. I assumed ZFS unlink behavior was smart enough to see that I had no snapshots and that it would really trim the data immediately. Having no idea how the internals of ZFS works, but a general understanding, I could see this being non-trivial as well to not hurt performance. Bryan