This patchset replaces the current barrier implementation with
sequenced flush which doesn't impose any restriction on ordering
around the flush requests. This patchst is result of the following
In summary, filesystems can take over the ordering of requests around
commit writes and the block layer should just supply a mechanism to
perform the commit writes themselves. This would greatly lessen tha
stall caused by queue dumping and draining used by the current barrier
implementation for request ordering.
This patchset converts barrier mechanism to sequenced flush/fua
mechanism in the following steps.
1. Kill the mostly unused ORDERED_BY_TAG support.
2. Deprecate REQ_HARDBARRIER support. All hard barrier requests are
failed with -EOPNOTSUPP.
3. Drop barrier ordering by queue draining mechanism.
4. Rename barrier to flush and implement new interface based on
REQ_FLUSH and REQ_FUA as suggested by Christoph.
blkdev_issue_flush() is converted to use the new mechanism but all the
filesystems still use the deprecated REQ_HARDBARRIER which always
fails. Each filesystem needs to be updated to enforce request
ordering themselves and then to use REQ_FLUSH/FUA mechanism.
loop, md, dm, etc... haven't been converted yet and REQ_FLUSH/FUA
doesn't work with them yet. I'll convert most of them soonish if this
patchset is generally agreed upon.