Re: [dm-devel] Re: [PATCH] Implement barrier support for singledevice DM devices

From: Neil Brown
Date: Wed Feb 20 2008 - 22:29:45 EST


On Monday February 18, jeremy@xxxxxxx wrote:
>
>
> I'll put it even more strongly. My experience is that disabling write
> cache plus disabling barriers is often much faster than enabling both
> barriers and write cache enabled, when doing metadata intensive
> operations, as long as you have a drive that is good at CTQ/NCQ.

Doesn't this speed gain come at a correctness cost? Barriers aren't
only about flushed the write cache. They are also about preventing
re-ordering, both at the "elevator" layer and inside the device.
If the device does CTQ, it could re-order requests could it not?
Then two writes sent from the fs could make it to media in the wrong
order, and a power failure in between could corrupt your data.

Or am I misunderstanding something ??

(of course this only applies to XFS where disabling barriers means
"hope for the best", as opposed to ext3 where disabling barriers means
"don't trust the device, impose explicit ordering").

NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/