From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Vladislav Bolkhovitin <vst@vlnb.net>
Cc: James Bottomley <James.Bottomley@suse.de>,
Dirk Meister <dmeister@uni-paderborn.de>,
linux-scsi@vger.kernel.org, Chetan Loke <chetanloke@gmail.com>,
Chetan Loke <generationgnu@yahoo.com>,
scst-devel <scst-devel@lists.sourceforge.net>,
linux-kernel@vger.kernel.org,
Mike Christie <michaelc@cs.wisc.edu>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: Re: [Scst-devel] Fwd: Re: linuxcon 2010...
Date: Tue, 24 Aug 2010 14:23:34 -0700 [thread overview]
Message-ID: <1282685014.32007.51.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <4C7421FB.2060007@vlnb.net>
On Tue, 2010-08-24 at 23:48 +0400, Vladislav Bolkhovitin wrote:
> James Bottomley, on 08/24/2010 06:57 PM wrote:
> > On Tue, 2010-08-24 at 18:41 +0400, Vladislav Bolkhovitin wrote:
> >> James Bottomley, on 08/22/2010 12:43 AM wrote:
> >>> Interface re-use (or at least ABI compatibility) is the whole point,
> >>> it's what makes the solution a drop in replacement.
> >>
> >> I see now. You want ABI compatibility to keep the "contract" that no
> >> kernel changes can break applications binary compatibility for unlimited
> >> time.
> >>
> >> OK, we will write the compatibility module. It shouldn't take much time.
> >>
> >> But before we start, I'd like to clear 2 related questions:
> >>
> >> 1. How far the ABI compatibility "contract" goes? Are there cases, where
> >> it isn't so strong? I'm asking, because I can recall that open-iscsi at
> >> least once has broken ABI compatibility with user space tools. Was it an
> >> accidental (but not corrected) mistake or was it deliberate? If the
> >> latter, then, I guess, there must be some exceptions defining when ABI
> >> compatibility can be not followed.
> >
> > I don't think it has to be complete. As long as the STGT people think
> > it's good enough, that's fine by me.
>
> Tomonori, Mike, could you comment on that, please?
>
> >> 2. Currently STGT in the kernel is just 2 files, scsi_tgt_if.c and
> >> scsi_tgt_lib.c (with headers), + ibmvstgt driver. The C files define the
> >> STGT interface in question. So, if we keep ABI compatibility with the
> >> new target engine, we would have to keep those 2 files included in the
> >> kernel,
> >
> > This isn't really correct. The ABI is defined by the headers not the
> > implementation.
>
> Yes, but we on the target side would not be able to implement the ABI compatible interface without using library functions provided by those C files. Or, at least, it would be much harder.
>
> So, would it be OK for you to keep those files?
>
> >> which would effectively mean that STGT would stay in the kernel.
> >> This would lead to the situation you are trying to avoid: 2 SCSI target
> >> infrastructures in the kernel. Would it be OK?
> >
> > If you mean is the marketing solution of wedging two products into the
> > kernel and calling it a single one going to fly, the answer is no.
>
> I mean that if we keep those 2 files to ease our ABI compatibility effort, it would effectively mean that we would leave STGT merged. It isn't something we would create, it just would be so itself as a matter of fact. Ultimately, STGT is an user space engine. What it has in the kernel is the interface helper functions to interact with the in-kernel drivers. The simplest way to achieve the ABI compatibility is to make a backend module acting as an STGT in-target driver.
>
> (Actually, I may not ask it, because this is the way how LIO seems[1] implemented that, which was approved on the LSF summit. I only want to make all pros and cons clear from the very beginning.)
>
> Thanks,
> Vlad
>
> 1. I wrote "seems", because currently LIO has the following code for STGT commands execution:
>
> int stgt_do_task(se_task_t *task)
> {
> stgt_plugin_task_t *st = (stgt_plugin_task_t *) task->transport_req;
> struct Scsi_Host *sh = task->se_dev->se_hba->hba_ptr;
> struct scsi_cmnd *sc;
> int tag = MSG_SIMPLE_TAG;
>
> sc = scsi_host_get_command(sh, st->stgt_direction, GFP_KERNEL);
> if (!sc) {
> printk(KERN_ERR "Unable to allocate memory for struct"
> " scsi_cmnd\n");
> return PYX_TRANSPORT_LU_COMM_FAILURE;
> }
>
> memcpy(sc->cmnd, st->stgt_cdb, MAX_COMMAND_SIZE);
> sc->sdb.length = task->task_size;
> sc->sdb.table.sgl = task->task_sg;
> sc->tag = tag;
>
> BUG();
> #warning FIXME: Get struct scsi_lun for scsi_tgt_queue_command()
> #if 0
> err = scsi_tgt_queue_command(sc, itn_id, (struct scsi_lun *)&cmd->lun,
> cmd->tag);
> if (err) {
> printk(KERN_INFO "scsi_tgt_queue_command() failed for sc:"
> " %p\n", sc);
> scsi_host_put_command(sh, sc);
> }
> #endif
> return PYX_TRANSPORT_SENT_TO_TRANSPORT;
> }
Vlad,
As mentioned explictly earlier in this thread, my WIP code for the
kernel level subsystem backstore using STGT kernel <-> user CDB
passthrough logic in drivers/target/target_core_stgt.c is a item on my
TODO list, but I will repeat, is NOT being tagged as a mainline .37
item.
Tomo-san, mnc, and other storage folks have been briefed on the
remaining issues that would be involved to get a prototype functioning
with drivers/target/target_core_stgt.c, and rough idea of what it would
take in existing mainline drivers/scsi/scsi_tgt_*.c code. With the
current WIP code this will allow the userspace CDB -> LUN passthrough to
function transparently with all TCM SPC-4 compliant logic as a
standalone struct se_subsystem_api tcm_core_stgt.ko backstore.
Best,
--nab
next prev parent reply other threads:[~2010-08-24 21:27 UTC|newest]
Thread overview: 95+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-18 14:58 [Scst-devel] Fwd: Re: linuxcon 2010 Chetan Loke
2010-08-18 15:11 ` James Bottomley
[not found] ` <AANLkTimJGxn=5kEMH68XVWqFcYG3vpfLjLjZpFGqhG_4@mail.gmail.com>
2010-08-18 15:30 ` Bart Van Assche
2010-08-18 16:04 ` Chetan Loke
2010-08-18 16:18 ` James Bottomley
2010-08-18 17:50 ` Vladislav Bolkhovitin
2010-08-19 1:18 ` jack wang
2010-08-19 21:20 ` Dirk Meister
2010-08-19 22:29 ` Nicholas A. Bellinger
2010-08-21 18:42 ` Vladislav Bolkhovitin
2010-08-21 20:25 ` Nicholas A. Bellinger
2010-08-24 18:08 ` Vladislav Bolkhovitin
2010-08-21 20:43 ` James Bottomley
2010-08-22 7:39 ` Bart Van Assche
2010-08-22 20:29 ` James Bottomley
2010-08-23 13:47 ` Joe Landman
2010-08-23 15:12 ` Bart Van Assche
[not found] ` <AANLkTim-M6dfLvJQnbieFqZCGG33E+-i+u_soCq2p9f1@mail.gmail.com>
2010-08-23 16:07 ` Chetan Loke
2010-08-23 18:03 ` Chetan Loke
2010-08-24 7:25 ` Pasi Kärkkäinen
2010-08-24 14:43 ` Linux I/O subsystem performance (was: linuxcon 2010...) Vladislav Bolkhovitin
2010-08-24 14:55 ` Matthew Wilcox
2010-08-24 17:51 ` Linux I/O subsystem performance Vladislav Bolkhovitin
2010-08-24 20:40 ` Matthew Wilcox
2010-08-24 14:55 ` [Scst-devel] Fwd: Re: linuxcon 2010 Chetan Loke
[not found] ` <4C7404C4.4040704@vlnb.net>
2010-08-24 20:31 ` Linux I/O subsystem performance (was: linuxcon 2010...) Chris Worley
2010-08-25 19:12 ` Linux I/O subsystem performance Vladislav Bolkhovitin
2010-09-16 15:05 ` Linux I/O subsystem performance (was: linuxcon 2010...) Chris Worley
2010-08-23 19:41 ` [Scst-devel] Fwd: Re: linuxcon 2010 Vladislav Bolkhovitin
2010-08-24 14:41 ` Vladislav Bolkhovitin
2010-08-24 14:51 ` Chris Weiss
2010-08-24 14:56 ` Matthew Wilcox
2010-08-25 22:20 ` Konrad Rzeszutek Wilk
2010-08-25 22:45 ` Ted Ts'o
2010-08-24 14:57 ` James Bottomley
2010-08-24 19:48 ` Vladislav Bolkhovitin
2010-08-24 21:23 ` Nicholas A. Bellinger [this message]
2010-08-26 20:11 ` Vladislav Bolkhovitin
2010-08-26 21:23 ` Nicholas A. Bellinger
2010-08-28 17:32 ` Vladislav Bolkhovitin
2010-08-28 20:47 ` Nicholas A. Bellinger
2010-08-30 20:47 ` Vladislav Bolkhovitin
2010-08-30 21:46 ` Nicholas A. Bellinger
2010-09-02 19:38 ` Vladislav Bolkhovitin
2010-09-02 20:25 ` Nicholas A. Bellinger
2010-09-05 20:18 ` Dmitry Torokhov
2010-09-05 21:50 ` Nicholas A. Bellinger
2010-09-05 23:13 ` Mark Deneen
2010-09-06 0:12 ` Nicholas A. Bellinger
2010-09-06 0:58 ` Mark Deneen
2010-09-06 1:34 ` Nicholas A. Bellinger
2010-09-06 5:04 ` Dmitry Torokhov
2010-09-05 23:41 ` Dmitry Torokhov
2010-09-05 23:59 ` Nicholas A. Bellinger
2010-09-06 4:56 ` Dmitry Torokhov
2010-09-06 10:39 ` James Bottomley
2010-09-06 11:02 ` Bart Van Assche
2010-09-06 11:27 ` James Bottomley
2010-09-06 15:26 ` Vladislav Bolkhovitin
2010-09-06 21:47 ` Vladislav Bolkhovitin
2010-09-06 21:55 ` Nicholas A. Bellinger
2010-09-06 22:14 ` david
2010-09-07 0:44 ` Dmitry Torokhov
2010-09-07 3:45 ` Chetan Loke
2010-09-07 6:15 ` Bart Van Assche
2010-09-07 6:08 ` Bart Van Assche
2010-09-07 6:26 ` Dmitry Torokhov
2010-09-07 6:29 ` Hannes Reinecke
2010-09-07 6:45 ` Bart Van Assche
2010-09-07 13:20 ` Vladislav Bolkhovitin
2010-09-07 20:14 ` Vladislav Bolkhovitin
2010-09-07 20:14 ` Vladislav Bolkhovitin
2010-09-06 21:16 ` Greg KH
2010-09-06 17:28 ` Chetan Loke
2010-09-06 21:52 ` Vladislav Bolkhovitin
2010-08-20 13:46 ` Ruben Laban
2010-08-18 17:51 ` Chetan Loke
2010-08-18 16:19 ` Bart Van Assche
2010-08-18 16:28 ` Joe Landman
2010-08-18 17:52 ` Vladislav Bolkhovitin
2010-08-18 15:12 ` Chetan Loke
2010-08-18 17:52 ` Vladislav Bolkhovitin
-- strict thread matches above, loose matches on Subject: below --
2010-08-20 17:40 Ari Lemmke
2010-08-16 16:20 Fwd: Re: [Scst-devel] " Vladislav Bolkhovitin
2010-08-17 20:30 ` James Bottomley
2010-08-18 17:52 ` Vladislav Bolkhovitin
2010-08-18 20:43 ` James Bottomley
2010-08-21 18:51 ` Vladislav Bolkhovitin
2010-08-21 20:38 ` James Bottomley
2010-08-22 22:10 ` [Scst-devel] Fwd: " Gennadiy Nerubayev
2010-08-23 16:59 ` James Bottomley
2010-08-23 17:44 ` Bart Van Assche
2010-08-23 17:58 ` James Bottomley
2010-08-23 20:11 ` Bart Van Assche
2010-08-23 20:21 ` James Bottomley
2010-08-23 19:40 ` Vladislav Bolkhovitin
2010-08-23 20:38 ` James Bottomley
2010-08-24 10:32 ` Bart Van Assche
2010-08-24 13:01 ` Chris Weiss
2010-08-24 19:53 ` Vladislav Bolkhovitin
2010-08-23 19:40 ` 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=1282685014.32007.51.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=James.Bottomley@suse.de \
--cc=chetanloke@gmail.com \
--cc=dmeister@uni-paderborn.de \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=generationgnu@yahoo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=scst-devel@lists.sourceforge.net \
--cc=vst@vlnb.net \
/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).