From owner-freebsd-fs@FreeBSD.ORG Sat Nov 10 21:24:09 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 6DB70717 for ; Sat, 10 Nov 2012 21:24:09 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 25EE78FC08 for ; Sat, 10 Nov 2012 21:24:08 +0000 (UTC) Received: by mail-ob0-f182.google.com with SMTP id wc20so6455429obb.13 for ; Sat, 10 Nov 2012 13:24:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5DxWrY517cqz658dsjUXzCQAmj1SDSXEanWyfkMCgyU=; b=eIQwJjVqL+LHwLKh9RvwordmMtllmmRI4yxOUtTC88kA6GtMZTsV477GwmQq0/xMof 3FmdOBk+5xtumFtC50iTQRH+1OuDyumDt4ACRMM1Hq6YW+rgwJq2pR6ziRGh9g5DnY3J VeB3rsm+wup17Lar0WJOj9a/xzoHFkRezpZYaRnaPDL5vmpeTILoQ920LK+6QZtvIgxl aY4jeiXLCRdUhHS1Wc+m3keyQvQ3mWhlLf9ih3cTcR47CxEvi5nF+BlWTpffzgUlSdt1 zsIC7njLZf9hZFAJEMQpijFhD6LYC3VX0KuIbMuZuJMfkiCpZOfFstrkkUjkLixVmyYN TotQ== MIME-Version: 1.0 Received: by 10.182.197.8 with SMTP id iq8mr3756727obc.66.1352582648356; Sat, 10 Nov 2012 13:24:08 -0800 (PST) Received: by 10.76.143.33 with HTTP; Sat, 10 Nov 2012 13:24:08 -0800 (PST) In-Reply-To: <20121110210317.GC19081@dft-labs.eu> References: <509E79C7.10300@shatow.net> <509EA942.9060801@shatow.net> <20121110194759.GA19081@dft-labs.eu> <20121110210317.GC19081@dft-labs.eu> Date: Sat, 10 Nov 2012 13:24:08 -0800 Message-ID: Subject: Re: ZFS can't delete files when over quota From: Garrett Cooper To: Mateusz Guzik Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-fs@freebsd.org 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: Sat, 10 Nov 2012 21:24:09 -0000 On Sat, Nov 10, 2012 at 1:03 PM, Mateusz Guzik wrote: > On Sat, Nov 10, 2012 at 11:55:14AM -0800, Garrett Cooper wrote: > > On Sat, Nov 10, 2012 at 11:48 AM, Mateusz Guzik > wrote: > > > > > On Sat, Nov 10, 2012 at 01:21:38PM -0600, Bryan Drewery wrote: > > > > On 11/10/2012 12:55 PM, Chris Rees wrote: > > > > > Bryan, > > > > > > > > > > Please try the patch at [1]; if it works I'll document it. > > > > > > > > > > Chris > > > > > > > > > > [1] http://www.bayofrum.net/~crees/patches/bdrewery.diff > > > > > > > > > > > > > Hmm, I'm not a fan of -T. I think it should just work out-of-the-box > > > here. > > > > > > > > Something like: > > > > > > > > http://people.freebsd.org/~bdrewery/rm-quota.txt > > > > > > > > > > I think this approach is incorrect. > > > > > > If you cannot rm $file due to EDQUOT, but truncate $file && rm $file > > > works (and both patches try to do this), then I think this is a > filesystem > > > bug. > > > > > > > Perhaps. This is kind of an implementation/compatibility issue because of > > how ZFS (and other COW-based FSes) work. > > 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. Thanks, -Garrett