From: Tejun Heo <htejun@gmail.com>
To: jeff@garzik.org, linux-ide@vger.kernel.org,
jens.axboe@oracle.com, linux-scsi@vger.kernel.org,
fujita.tomonori@lab.ntt.co.jp,
James.Bottomley@HansenPartnership.com, akpm@linux-foundation.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 5/7] block: clear drain buffer if draining for write command
Date: Sat, 9 Feb 2008 10:40:24 +0900 [thread overview]
Message-ID: <12025212272956-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <12025212262892-git-send-email-htejun@gmail.com>
Clear drain buffer before chaining if the command in question is a
write.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
block/blk-merge.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/block/blk-merge.c b/block/blk-merge.c
index d50cfc8..d0b9031 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -221,6 +221,9 @@ new_segment:
} /* segments in rq */
if (q->dma_drain_size && q->dma_drain_needed(rq)) {
+ if (rq->cmd_flags & REQ_RW)
+ memset(q->dma_drain_buffer, 0, q->dma_drain_size);
+
sg->page_link &= ~0x02;
sg = sg_next(sg);
sg_set_page(sg, virt_to_page(q->dma_drain_buffer),
--
1.5.2.4
next prev parent reply other threads:[~2008-02-09 1:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-09 1:40 [PATCHSET #upstream] block/libata: update and use block layer padding and draining, take 2 Tejun Heo
2008-02-09 1:40 ` [PATCH 1/7] libata: update ATAPI overflow draining Tejun Heo
2008-02-09 1:40 ` [PATCH 2/7] block: update bio according to DMA alignment padding Tejun Heo
2008-02-09 1:40 ` [PATCH 3/7] block: add request->raw_data_len Tejun Heo
2008-02-09 1:40 ` [PATCH 4/7] block: implement request_queue->dma_drain_needed Tejun Heo
2008-02-09 1:40 ` Tejun Heo [this message]
2008-02-11 23:14 ` [PATCH 5/7] block: clear drain buffer if draining for write command James Bottomley
2008-02-09 1:40 ` [PATCH 6/7] libata: eliminate the home grown dma padding in favour of that provided by the block layer Tejun Heo
2008-02-09 1:40 ` [PATCH 7/7] libata: implement drain buffers Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=12025212272956-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jeff@garzik.org \
--cc=jens.axboe@oracle.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).