From b897f3141a2b83b6d7288859a36e6e1df21bd4c3 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 10 Jul 2007 12:26:29 +0200 Subject: [PATCH] --- yaml --- r: 58515 b: refs/heads/master c: c0613c1c940dac991b9e54db75dc9976491d9f0a h: refs/heads/master i: 58513: 57eb6a22e7c26ab9169b584e444b518a3bbb3a80 58511: b5fee787acefccb227ab47fffaa9ddd860bdd4bb v: v3 --- [refs] | 2 +- trunk/Documentation/block/barrier.txt | 16 +++------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index 15727e89b3a8..596b4dccf1fa 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 70cee26e020c1d74ff559c991b96c7b19fa4173b +refs/heads/master: c0613c1c940dac991b9e54db75dc9976491d9f0a diff --git a/trunk/Documentation/block/barrier.txt b/trunk/Documentation/block/barrier.txt index a272c3db8094..7d279f2f5bb2 100644 --- a/trunk/Documentation/block/barrier.txt +++ b/trunk/Documentation/block/barrier.txt @@ -82,23 +82,12 @@ including draining and flushing. typedef void (prepare_flush_fn)(request_queue_t *q, struct request *rq); int blk_queue_ordered(request_queue_t *q, unsigned ordered, - prepare_flush_fn *prepare_flush_fn, - unsigned gfp_mask); - -int blk_queue_ordered_locked(request_queue_t *q, unsigned ordered, - prepare_flush_fn *prepare_flush_fn, - unsigned gfp_mask); - -The only difference between the two functions is whether or not the -caller is holding q->queue_lock on entry. The latter expects the -caller is holding the lock. + prepare_flush_fn *prepare_flush_fn); @q : the queue in question @ordered : the ordered mode the driver/device supports @prepare_flush_fn : this function should prepare @rq such that it flushes cache to physical medium when executed -@gfp_mask : gfp_mask used when allocating data structures - for ordered processing For example, SCSI disk driver's prepare_flush_fn looks like the following. @@ -106,9 +95,10 @@ following. static void sd_prepare_flush(request_queue_t *q, struct request *rq) { memset(rq->cmd, 0, sizeof(rq->cmd)); - rq->flags |= REQ_BLOCK_PC; + rq->cmd_type = REQ_TYPE_BLOCK_PC; rq->timeout = SD_TIMEOUT; rq->cmd[0] = SYNCHRONIZE_CACHE; + rq->cmd_len = 10; } The following seven ordered modes are supported. The following table