mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Wanlong Gao <gaowanlong@cn.fujitsu.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	linux-scsi@vger.kernel.org,
	virtualization@lists.linux-foundation.org, rusty@rustcorp.com.au,
	mst@redhat.com, asias@redhat.com
Subject: Re: [PATCH V5 1/5] virtio-scsi: redo allocation of target data
Date: Tue, 19 Mar 2013 12:00:27 +0000	[thread overview]
Message-ID: <1363694427.2377.57.camel@dabdike.int.hansenpartnership.com> (raw)
In-Reply-To: <51484FC2.6030601@redhat.com>

On Tue, 2013-03-19 at 12:45 +0100, Paolo Bonzini wrote:
> Il 19/03/2013 12:32, James Bottomley ha scritto:
> > On Tue, 2013-03-19 at 17:57 +0800, Wanlong Gao wrote:
> >> From: Paolo Bonzini <pbonzini@redhat.com>
> >>
> >> virtio_scsi_target_state is now empty.  We will find new uses for it in
> >> the next few patches, so this patch does not drop it completely.
> >> However, having dropped the sglist flexible array member, we can turn
> >> the tgt array-of-pointers into a simple array.  This simplifies the
> >> allocation.
> >>
> >> Even simpler would be to place the virtio_scsi_target_state structs in a
> >> flexible array member at the end of struct virtio_scsi.  But we do not
> >> do that, because we will place the virtqueues there in the next patches.
> > 
> > I'm really sorry, but I must have been asleep at the wheel when I let
> > code like this go in.  No modern driver should have fixed arrays for
> > target information.  The way this is supposed to work is that you have
> > entries in the host template for target_alloc and target_destroy.  You
> > hook into these and attach your struct virtio_scsi_target_state to
> > scsi_target->hostdata,
> 
> So that would be sc->device->sdev_target->hostdata.

No, unfortunate name, but it's used for something else (actually, I
think it *was* used by something else and is unused now).  The construct
is

scsi_target(sc->device)->hostdata

James



  reply	other threads:[~2013-03-19 12:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19  9:57 [PATCH V5 0/5] virtio-scsi multiqueue Wanlong Gao
2013-03-19  9:57 ` [PATCH V5 1/5] virtio-scsi: redo allocation of target data Wanlong Gao
2013-03-19 11:32   ` James Bottomley
2013-03-19 11:45     ` Paolo Bonzini
2013-03-19 12:00       ` James Bottomley [this message]
2013-03-19  9:57 ` [PATCH V5 2/5] virtio-scsi: pass struct virtio_scsi to virtqueue completion function Wanlong Gao
2013-03-19  9:57 ` [PATCH V5 3/5] virtio-scsi: push vq lock/unlock into virtscsi_vq_done Wanlong Gao
2013-03-19  9:57 ` [PATCH V5 4/5] virtio-scsi: introduce multiqueue support Wanlong Gao
2013-03-20  1:46   ` Venkatesh Srinivas
2013-03-20  7:24     ` Wanlong Gao
2013-03-20  9:53     ` Paolo Bonzini
2013-03-19  9:57 ` [PATCH V5 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug Wanlong Gao

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=1363694427.2377.57.camel@dabdike.int.hansenpartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=asias@redhat.com \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.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

all inboxes | Powered by JetHome®