Re: multiple pending filesystem requests for the same block ?

From: Scott Long <scottl_at_samsco.org>
Date: Tue, 26 Jul 2005 09:33:46 -0600
Luigi Rizzo wrote:
> (context: SoC work on pluggable disk schedulers,
> 	http://wikitest.freebsd.org/moin.cgi/Hybrid
> 
> 
> The doubt we have is the following:
> 
> 	can the filesystem code have multiple pending write requests for
> 	the same disk block ?
> 
> the current (elevator) disk scheduler should have no problem with
> this, because even if disksort reorders requests, two requests
> for the same block retain the issue ordering.
> 
> However we wonder if this feature is actually expected by
> the filesystem code, or it does not matter because it
> never issues a new request before the previous one on the
> same area is complete.
> 
> 	thanks
> 	luigi

A write can either be direct through a strategy routine (and bypass the 
bufcache), or it can be synchronous via bwrite(), or it can be 
asynchronous via bawrite() and  bdwrite().  For the synchronous cases 
there is no guarantee of ordering.  For the async case (which most 
writes in the FS are), the bufcache will coelsce multiple writes to the 
same block.  Softupdate intercepts metadata writes and ensures that they
get coelesced and ordered correctly.  Data writes happen on a first
come first serve basis, and it's up to the application to use file locks
to ensure proper ordering between competing processes or threads.

Scott
Received on Tue Jul 26 2005 - 13:34:07 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:39 UTC