[linux-lvm] fsync() and LVM

Stuart D. Gathman stuart at bmsi.com
Sat Mar 14 14:31:51 UTC 2009


On Sat, 14 Mar 2009, Dietmar Maurer wrote:

> > Let's try to clear up the confusion.
> > 
> > Kernel device-mapper (which lvm uses) does not support write barriers
> > except in very restricted circumstances (when only one device is
> > involved and the mapping is trivial).  If dm receives a write barrier
> > which is not supported it notifies the caller (typically a filesystem)
> > so appropriate action can be taken if it wishes.
> 
> Does that mean I should never use more than one device if I have
> applications depending on fsync (databases)?

It just means that write barriers won't get passed to the device.
This is only a problem if the devices have write caches.  Note 
that with multiple devices, even a FIFO write cache could cause 
reordering between devices (one device could finish faster than another).

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the linux-lvm mailing list