diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-07-10 06:26:29 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-07-10 07:43:34 -0400 |
commit | c0613c1c940dac991b9e54db75dc9976491d9f0a (patch) | |
tree | 302373fa9827466aec97dcd4b84d77a8a9b68fdd /Documentation/block | |
parent | 70cee26e020c1d74ff559c991b96c7b19fa4173b (diff) |
Documentation/block/barrier.txt is not in sync with the actual code: - blk_queue_ordered() no longer has a gfp_mask parameter - blk_queue_ordered_locked() no longer exists - sd_prepare_flush() looks slightly different
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Acked-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'Documentation/block')
-rw-r--r-- | Documentation/block/barrier.txt | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/Documentation/block/barrier.txt b/Documentation/block/barrier.txt index a272c3db8094..7d279f2f5bb2 100644 --- a/Documentation/block/barrier.txt +++ b/Documentation/block/barrier.txt | |||
@@ -82,23 +82,12 @@ including draining and flushing. | |||
82 | typedef void (prepare_flush_fn)(request_queue_t *q, struct request *rq); | 82 | typedef void (prepare_flush_fn)(request_queue_t *q, struct request *rq); |
83 | 83 | ||
84 | int blk_queue_ordered(request_queue_t *q, unsigned ordered, | 84 | int blk_queue_ordered(request_queue_t *q, unsigned ordered, |
85 | prepare_flush_fn *prepare_flush_fn, | 85 | prepare_flush_fn *prepare_flush_fn); |
86 | unsigned gfp_mask); | ||
87 | |||
88 | int blk_queue_ordered_locked(request_queue_t *q, unsigned ordered, | ||
89 | prepare_flush_fn *prepare_flush_fn, | ||
90 | unsigned gfp_mask); | ||
91 | |||
92 | The only difference between the two functions is whether or not the | ||
93 | caller is holding q->queue_lock on entry. The latter expects the | ||
94 | caller is holding the lock. | ||
95 | 86 | ||
96 | @q : the queue in question | 87 | @q : the queue in question |
97 | @ordered : the ordered mode the driver/device supports | 88 | @ordered : the ordered mode the driver/device supports |
98 | @prepare_flush_fn : this function should prepare @rq such that it | 89 | @prepare_flush_fn : this function should prepare @rq such that it |
99 | flushes cache to physical medium when executed | 90 | flushes cache to physical medium when executed |
100 | @gfp_mask : gfp_mask used when allocating data structures | ||
101 | for ordered processing | ||
102 | 91 | ||
103 | For example, SCSI disk driver's prepare_flush_fn looks like the | 92 | For example, SCSI disk driver's prepare_flush_fn looks like the |
104 | following. | 93 | following. |
@@ -106,9 +95,10 @@ following. | |||
106 | static void sd_prepare_flush(request_queue_t *q, struct request *rq) | 95 | static void sd_prepare_flush(request_queue_t *q, struct request *rq) |
107 | { | 96 | { |
108 | memset(rq->cmd, 0, sizeof(rq->cmd)); | 97 | memset(rq->cmd, 0, sizeof(rq->cmd)); |
109 | rq->flags |= REQ_BLOCK_PC; | 98 | rq->cmd_type = REQ_TYPE_BLOCK_PC; |
110 | rq->timeout = SD_TIMEOUT; | 99 | rq->timeout = SD_TIMEOUT; |
111 | rq->cmd[0] = SYNCHRONIZE_CACHE; | 100 | rq->cmd[0] = SYNCHRONIZE_CACHE; |
101 | rq->cmd_len = 10; | ||
112 | } | 102 | } |
113 | 103 | ||
114 | The following seven ordered modes are supported. The following table | 104 | The following seven ordered modes are supported. The following table |