From: majianpeng <majianpeng@gmail.com>
To: nab <nab@linux-iscsi.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: [PATCH 4/6] scsi-mq: init sg in scsi_init_io.
Date: Fri, 29 Nov 2013 16:42:12 +0800 [thread overview]
Message-ID: <201311291642081351818@gmail.com> (raw)
Make scsi-mq support blk-pc-command.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
drivers/scsi/scsi_lib.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index bed596e..679e840 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1059,9 +1059,11 @@ int scsi_init_io(struct scsi_cmnd *cmd, gfp_t gfp_mask)
/*
* Use pre-allocation of cmd->sdb scatterlists with scsi-mq..
*/
-//FIXME: scsi-mq dif descriptor init within scsi_init_io
if (rq->mq_ctx) {
BUG_ON(rq->nr_phys_segments > SCSI_MAX_SG_SEGMENTS);
+ cmd->sdb.table.sgl = cmd->mq_sgl;
+ cmd->sdb.table.nents = rq->nr_phys_segments;
+ sg_init_table(cmd->sdb.table.sgl, rq->nr_phys_segments);
scsi_init_sgtable(rq, &cmd->sdb);
return BLKPREP_OK;
}
--
1.7.10.4
next reply other threads:[~2013-11-29 8:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 8:42 majianpeng [this message]
2013-12-23 6:43 ` [PATCH 4/6] scsi-mq: init sg in scsi_init_io Nicholas A. Bellinger
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=201311291642081351818@gmail.com \
--to=majianpeng@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.