From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Boaz Harrosh <bharrosh@panasas.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Mike Christie <michaelc@cs.wisc.edu>,
Jens Axboe <jens.axboe@oracle.com>,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
Geoff Levand <geoffrey.levand@am.sony.com>,
Douglas Gilbert <dgilbert@interlog.com>,
Christoph Hellwig <hch@lst.de>, Paul Mundt <lethal@linux-sh.org>
Subject: Re: [PATCH] [Target_Core_Mod/pSCSI]: Add optional legacy scsi_execute_async() usage for Linux/SCSI passthrough
Date: Mon, 20 Apr 2009 13:36:05 -0700 [thread overview]
Message-ID: <1240259765.4176.764.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <49EB036B.8090607@panasas.com>
On Sun, 2009-04-19 at 13:56 +0300, Boaz Harrosh wrote:
> On 04/17/2009 04:09 AM, Nicholas A. Bellinger wrote:
> > Greetings all,
> >
> > This patch modifies the Target_Core_Mod/ConfigFS v3.0 PSCSI subsystem plugin for target_core_mod v3.0 to add
> > a configurable method of choosing legacy scsi_execute_async() usage for underlying SCSI HTCL struct scsi_device.
> > This method is still the only method of issuing I/O to the Linux SCSI subsystem is used for non TYPE_DISK hardware
> > SCSI and SATA devices that appear under Linux-SCSI, but have not yet been updated to accept raw struct request
> > operations directly. Some of these include TYPE_ROM, TYPE_TYPE and TYPE_MEDIUM_CHANGER hardware.
> >
> > This method can be used be used via ConfigFS as follows:
> >
> > export TARGET=/sys/kernel/config/target/core/
> > # load target_core_mod
> > modprobe target_core_mod
> > # The Linux/SCSI scsi host id is part of pscsi_$HOST_ID HBA name..
> > mkdir -p $TARGET/pscsi_0/sr0
> > # echo CTL to the control configfs attribute
> > echo scsi_channel_id=0,scsi_target_id=0,scsi_lun_id=0 > $TARGET/pscsi_0/sr0/control
> > # Activate the target_core_mod/ConfigFS PSCSI storage object
> > echo 1 > $TARGET/pscsi_0/sr0/enable
> >
> > At this point, creating symlinks for SCSI target ports to configfs enabled fabric modules
> > against PSCSI hardware passthrough using te HCTL reference will work.
> >
> > This patch are made against lio-core-2.6.git/master and tested on
> > v2.6.29 x86 32-bit HVM with TYPE_DISK and v2.6.29 ppc64 with TYPE_ROM.
> > The lio-core-2.6.git tree can be found at:
> >
> > http://git.kernel.org/?p=linux/kernel/git/nab/lio-core-2.6.git;a=summary
> >
> > :-)
> >
>
> Are you aware that scsi_execute_async() has gone in 2.6.30-rc1?
>
> I'm not sure what would be the best alternative for you. I would say
> a bio, but it is still being debated. Your current options are:
>
> 1. bio_alloc then loop () bio_add_pc_page, and finally blk_rq_append_bio
> (Which block people don't like)
> 2. sglist => page-pointers-array translation and blk_rq_map_user with
> struct rq_map_data mode. (not possible with all kind of sglists)
> 2. sglist => iovec translation and blk_rq_map_user_iov()
> (Very very ugly mapping of pages to virtual pointers)
>
> I have a similar situation with my OSD code.
>
Hey,
Thanks for the pointers on this.. Yeah, I knew it was going away soon,
but needed it for some legacy drivers..:-)
Anyways, I will drop this patch for scsi_execute_async() when I branch
for v2.6.30-rcX and look and updating target_core_mod/pSCSI to one of
the listed methods to get up and running. From the looks of it however
we might want something slightly better than blk_rq_map_user() for the
kernel space pages attached to struct scatterlist and page_links..
Just FYI, the target_core_mod struct scatterlist memory will be in
struct list_head with struct page for allocated se_cmd_t (received CDB),
so it will be pretty easy from the target_core_mod+subsystem plugin side
side to put something that along the lines of list =>
page-pointers-array translation and blk_rq_map_user() into a new
function..
lio-core-2.6.git/drivers/target/target_core_transport.c is using
include/linux/scatterlist.h macros when interacting with struct
scatterlist allocated for each subsystem plugin (from the linked list
struct page memory) I will have a look and see what would need to be
down to allow all kinds of sglists with something new..
Thanks for your comments!
--nab
next prev parent reply other threads:[~2009-04-20 20:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-17 1:09 Nicholas A. Bellinger
2009-04-19 10:56 ` Boaz Harrosh
2009-04-20 20:36 ` Nicholas A. Bellinger [this message]
2009-04-22 12:34 ` Boaz Harrosh
2009-04-21 12:15 ` Vladislav Bolkhovitin
2009-04-22 13:24 ` Boaz Harrosh
2009-04-22 19:06 ` Douglas Gilbert
2009-04-23 8:34 ` Boaz Harrosh
2009-04-24 19:17 ` Vladislav Bolkhovitin
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=1240259765.4176.764.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=Geert.Uytterhoeven@sonycom.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bharrosh@panasas.com \
--cc=dgilbert@interlog.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=geoffrey.levand@am.sony.com \
--cc=hch@lst.de \
--cc=jens.axboe@oracle.com \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
/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
all inboxes | Powered by JetHome®