Date: Wed, 11 Aug 2004 15:52:14 -0700 (PDT) From: Don Lewis <truckman@FreeBSD.org> To: nate@root.org Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_shutdown.c vfs_subr.c Message-ID: <200408112252.i7BMqELT018444@gw.catspoiler.org> In-Reply-To: <411A4B4F.6070007@root.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11 Aug, Nate Lawson wrote: > Don Lewis wrote: >> On 10 Aug, Nate Lawson wrote: >> >>>njl 2004-08-10 01:32:05 UTC >>> >>> FreeBSD src repository >>> >>> Modified files: >>> sys/kern kern_shutdown.c vfs_subr.c >>> Log: >>> Skip the syncing disks loop if there are no dirty buffers. Remove a >>> variable used to flag the initial printf. >>> >>> Submitted by: truckman (earlier version) >>> >>> Revision Changes Path >>> 1.162 +13 -5 src/sys/kern/kern_shutdown.c >>> 1.519 +1 -1 src/sys/kern/vfs_subr.c >> >> >> BDE had a number of objections to this patch. This is the alternative >> that I came up with: > > Feel free to rework/commit it. I think your patch is a little rough > still but generally think it's a good idea to reuse the check for nbufs. I wasn't terribly happy with three slightly different copies of the code to compute nbufs and neither was BDE. He also wanted sync() to be called even if no buffers were initially busy, because sync() itself can dirty some buffers. BDE also claimed that kernel printf() messages should not be sentences and should not begin with a capital letter. This doesn't seem to be documented anywhere, and we're hardly consistent in terms of the latter, but I changed this anyway. I tossed in the printf("\n") because I used VT2xx terminals as serial consoles for many years, and they always seemed to get set to line-wrapping disabled mode. I didn't want the "giving up" or "final sync complete" messages to get lost because the outer loop went through an arbitrarily large number of iterations. I just now noticed that the "normal" case is a bit too verbose, so I just tossed a if (!first_buf_printf) before the printf("final sync complete\n"); I'm open to any reasonable suggestions on how to decorate this particular bikeshed before I do the commit.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408112252.i7BMqELT018444>