Date: Sat, 10 Nov 2012 14:29:46 -0600 From: Kevin Day <toasty@dragondata.com> To: Bryan Drewery <bryan@shatow.net> Cc: "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org> Subject: Re: ZFS can't delete files when over quota Message-ID: <67C1C89F-4A91-4595-8EA7-19AF3EC4656F@dragondata.com> In-Reply-To: <509EA942.9060801@shatow.net> References: <509E79C7.10300@shatow.net> <CADLo83-mZ0v=zXJnHF01%2BtOvCtBWtrOTZpcd-V%2BWTF7qXNMJUg@mail.gmail.com> <CAFMmRNx2Xqo%2B3FZ6cT%2Ben-u26SVAecN%2B9ULfoV==fXRRTG7fDg@mail.gmail.com> <CADLo83_wEvUtYDgzoCoE4oNF7j3AMWe-AX6OvpxM12xd5AzJ7w@mail.gmail.com> <509EA942.9060801@shatow.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 10, 2012, at 1:21 PM, Bryan Drewery <bryan@shatow.net> wrote: > On 11/10/2012 12:55 PM, Chris Rees wrote: >> Bryan, >>=20 >> Please try the patch at [1]; if it works I'll document it. >>=20 >> Chris >>=20 >> [1] http://www.bayofrum.net/~crees/patches/bdrewery.diff >>=20 >=20 > Hmm, I'm not a fan of -T. I think it should just work out-of-the-box = here. >=20 > Something like: >=20 > http://people.freebsd.org/~bdrewery/rm-quota.txt >=20 > Bryan This also may cause unintended or weird behavior with regard to = open/running binaries or processes that want to keep a file open. If you're trying to rm a binary that's currently in use, this is = normally a supported feature. Old copies of the binary keep running and = the disk space isn't actually freed until after everything holding the = old version exits. With the patch, truncate will fail with ETXTBSY. = Having rm fail with ETXTBSY is probably wrong. Programs are also allowed to keep reading/writing to a file that another = process has unlinked. Unlinking a file is not supposed to destroy the = contents of it until after everyone is done with it. Throwing a truncate = in there changes that behavior. I realize this is only happening under already broken circumstances, but = changing unlink to occasionally doing unlink-truncate-unlink is going to = make some hard to debug situations occur. Also, you need to be testing errno =3D=3D EDQUOT, not rval. -- Kevin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?67C1C89F-4A91-4595-8EA7-19AF3EC4656F>