From owner-freebsd-current Thu Jun 22 17:30:39 2000 Delivered-To: freebsd-current@freebsd.org Received: from guru.mired.org (zoom2-182.telepath.com [216.14.2.182]) by hub.freebsd.org (Postfix) with SMTP id 8812037C090 for ; Thu, 22 Jun 2000 17:29:57 -0700 (PDT) (envelope-from mwm@mired.org) Received: (qmail 6537 invoked by uid 100); 23 Jun 2000 00:29:05 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14674.44881.186885.439009@guru.mired.org> Date: Thu, 22 Jun 2000 19:29:05 -0500 (CDT) To: Peter Jeremy Cc: Chris Dillon , cvs-all@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: cvs commit: src/sys/contrib/softupdates softdep.h ffs_softdep.c In-Reply-To: <00Jun23.075254est.115312@border.alcanet.com.au> References: <86g0q6gw5x.wl@localhost.local.idaemons.org> <00Jun23.075254est.115312@border.alcanet.com.au> X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Peter Jeremy writes: > On 2000-Jun-22 15:22:12 -0500, Chris Dillon wrote: > >I think it would be a very good idea to enable softupdates by default > >when a new filesystem is created. Modify newfs to do this and use > >tunefs only if you want to _disable_ softupdates on a filesystem. > > My only concern with doing this is softupdates behaviour when disk > space is freed. If you delete a file, it takes about 20 seconds for > the space occupied by the file to appear in the free list. If you > have relatively little free disk space and write another file, you > can get `disk full', even though there will be sufficient free space > when the freed blocks become available. Yup. > This has bitten a number of people who have turned softupdates on for > their root filesystems - and had installworld die. I get bit by "make install" for the kernel under those conditions. The other side effect is with scripts that rearrange disk space and then want to report on remaining space - df returns the out-of-date answer. I know - this is a multitasking OS, so you have to live with that kind of thing, but it shouldn't be quite so blatant. > Whilst the solution to this appears obvious (if you can't allocate a > block, but there are free blocks on the to-be-commited list, wait for > free space to become available), actually implementing it is quite > difficult if you want to avoid deadlocks. Kirk has previously > recommended that softupdates not be enabled on a filesystem unless it > has sufficient free space to absorb about 1 minute's writes. The "obvious solution" won't fix the second problem I see. The solution to that one sould be that a "sync" on the file system in question does what you expect it to do (and now several someones can point out the discussion of why this doesn't work, right?). That fixes the second problem, and provides a workaround for the first problem if you really need it.