public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Update Documentation/block/barrier.txt
@ 2007-05-29  9:11 Geert Uytterhoeven
  2007-05-29 12:22 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2007-05-29  9:11 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Linux Kernel Development

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>
---
 Documentation/block/barrier.txt |   16 +++-------------
 1 files changed, 3 insertions(+), 13 deletions(-)

--- a/Documentation/block/barrier.txt
+++ b/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

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- Sony Network and Software Technology Center Europe (NSCE)
Geert.Uytterhoeven@sonycom.com ------- The Corporate Village, Da Vincilaan 7-D1
Voice +32-2-7008453 Fax +32-2-7008622 ---------------- B-1935 Zaventem, Belgium

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Update Documentation/block/barrier.txt
  2007-05-29  9:11 [PATCH] Update Documentation/block/barrier.txt Geert Uytterhoeven
@ 2007-05-29 12:22 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2007-05-29 12:22 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Linux Kernel Development

Geert Uytterhoeven wrote:
> 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>

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-29 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-29  9:11 [PATCH] Update Documentation/block/barrier.txt Geert Uytterhoeven
2007-05-29 12:22 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox