cvs commit: src/sys/kern kern_shutdown.c vfs_subr.c

Don Lewis truckman at FreeBSD.org
Wed Aug 11 15:52:23 PDT 2004


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.




More information about the cvs-all mailing list