From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: linux-scsi <linux-scsi@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Tejun Heo <teheo@suse.de>,
Nicholas Bellinger <nab@linux-iscsi.org>
Subject: [PATCH] tcm/pscsi: Convert struct bio->bi_rw assignment to use REQ_WRITE
Date: Sun, 29 Aug 2010 17:26:18 -0700 [thread overview]
Message-ID: <1283127978-13861-1-git-send-email-nab@linux-iscsi.org> (raw)
From: Nicholas Bellinger <nab@linux-iscsi.org>
Greetings hch and tejun,
This patch updates pscsi_map_task_SG() to use the new .36-rc REQ_WRITE
macro in include/linux/blk_types.h when setting struct bio->bi_rw for
WRITE I/O. This replaces the legacy (1 << BIO_RW) assignment, for which
the new REQ_WRITE macro expands to:
#define REQ_WRITE (1 << __REQ_WRITE)
to match the old BIO_RW assignement.
Thanks!
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
---
drivers/target/target_core_pscsi.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 517268d..64808f1 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -30,6 +30,7 @@
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/blkdev.h>
+#include <linux/blk_types.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/smp_lock.h>
@@ -1103,11 +1104,9 @@ static int pscsi_map_task_SG(struct se_task *task)
bio = pscsi_get_bio(pdv, nr_vecs);
if (!(bio))
goto fail;
- /*
- * FIXME: Use bio_set_dir() when avaliable
- */
+
if (rw)
- bio->bi_rw |= (1 << BIO_RW);
+ bio->bi_rw |= REQ_WRITE;
DEBUG_PSCSI("PSCSI: Allocated bio: %p,"
" dir: %s nr_vecs: %d\n", bio,
--
1.5.6.5
reply other threads:[~2010-08-30 0:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1283127978-13861-1-git-send-email-nab@linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=teheo@suse.de \
/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).