[dm-devel] Re: [RFD] BIO_RW_BARRIER - what it means for devices, filesystems, and dm/md.

Phillip Susi psusi at cfl.rr.com
Tue May 29 20:03:43 UTC 2007


David Chinner wrote:
> Sounds good to me, but how do we test to see if the underlying
> device supports barriers? Do we just assume that they do and
> only change behaviour if -o nobarrier is specified in the mount
> options?

The idea is that ALL block devices will support barriers; if the 
underlying driver doesn't, then the block layer will work around it.

> The use of barriers in XFS assumes the commit write to be on stable
> storage before it returns.  One of the ordering guarantees that we
> need is that the transaction (commit write) is on disk before the
> metadata block containing the change in the transaction is written
> to disk and the current barrier behaviour gives us that.

Barrier != synchronous write, so if XFS relies on that block being on 
the media when the request is completed, then it is broken.  It should 
only care that the ordering of log-data-log is maintained, not exactly 
when each specific request completes.





More information about the dm-devel mailing list