[PATCHSET block#for-2.6.29] block: simplify and fix empty barrier

From: Tejun Heo
Date: Thu Nov 27 2008 - 23:33:58 EST



Hello, Jens.

As it currently stands, empty barrier is being handled a little bit
differently from other types of barriers. It wraps around the normal
barrier implementation but intercepts BAR issue and completes it in
elv_next_request() without letting the low level driver see it. This
works but is a little bit hacky.

The barrier or ordered sequence implementation is already quite
flexible to accomodate different modes, it just needs small
adjustments to support empty barrier in similar way different barrier
modes are handled.

This patchset updates start_ordered() and ordered sequence completion
more flexible such that BAR itself can be made optional and
reimplements empty barrier by simply turning off DO_BAR and
DO_POSTFLUSH flags in start_ordered().

This patchset also fixes empty barrier on write-through (or no cache)
w/ ordered tag. Previously, this basically desolved into noop and
without any command to issue, ordering by tag wasn't enforced at all.
This patchset promotes such empty barriers to DRAIN.

This patchset contains the following six patches.

0001-block-reorganize-QUEUE_ORDERED_-constants.patch
0002-block-remove-duplicate-or-unused-barrier-discard-er.patch
0003-block-make-every-barrier-action-optional.patch
0004-block-make-barrier-completion-more-robust.patch
0005-block-simplify-empty-barrier-implementation.patch
0006-block-fix-empty-barrier-on-write-through-w-ordered.patch

0001-0002 preps for the following changes. 0003-0004 makes ordered
sequence implementation more flexible. 0005 simplifies empty barrier
implementation and 0006 fixes the noop bug.

This patchset is on top of

linux-2.6-block#for-2.6.29 (75f2e95a9641224c7077d5e677f2a5fe2fdd4f0e)
+ block-internal-dequeue-shouldnt-start-timer [1]

and contains the following changes.

block/blk-barrier.c | 120 +++++++++++++++++++++++++++++++------------------
block/blk-core.c | 44 ++++-------------
block/elevator.c | 18 ++-----
include/linux/blkdev.h | 47 +++++++++++--------
4 files changed, 122 insertions(+), 107 deletions(-)

Thanks.

--
tejun

[1] http://article.gmane.org/gmane.linux.kernel/763054
--
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/