* [PATCH] target: virtio_scsi: SCSI host lock push-down
@ 2011-12-02 21:13 Sebastian Andrzej Siewior
2011-12-02 21:43 ` Nicholas A. Bellinger
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2011-12-02 21:13 UTC (permalink / raw)
To: Nicholas A. Bellinger
Cc: target-devel, linux-scsi, Jeff Garzik, James E.J. Bottomley,
Sebastian Andrzej Siewior
Commit f281233d aka ("SCSI host lock push-down") was converting all
drivers in tree. It looks to me that those two were not omitted on
purpose. tcm_loop joined the tree after the conversion and virtio_scsi
lives only in Nicholas' lio tree. So here is an equivalent change for
those two.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
Having a differnt callback name for converted and not converted users
would probably make it easier to tell them apart.
drivers/scsi/virtio_scsi.c | 4 +++-
drivers/target/loopback/tcm_loop.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
index 7946f40..4c577fa 100644
--- a/drivers/scsi/virtio_scsi.c
+++ b/drivers/scsi/virtio_scsi.c
@@ -151,7 +151,7 @@ static void virtscsi_map_cmd(struct virtio_scsi *vscsi, struct scsi_cmnd *sc,
sg_set_buf(&sg[idx++], &cmd->footer, sizeof(cmd->footer));
}
-static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc)
+static int virtscsi_queuecommand_lck(struct Scsi_Host *sh, struct scsi_cmnd *sc)
{
struct virtio_scsi *vscsi = shost_priv(sh);
struct virtio_scsi_cmd *cmd;
@@ -190,6 +190,8 @@ static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc)
return ret;
}
+static DEF_SCSI_QCMD(virtscsi_queuecommand);
+
static struct scsi_host_template virtscsi_host_template = {
.module = THIS_MODULE,
.name = "Virtio SCSI HBA",
diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
index 5f69594..92ef58a 100644
--- a/drivers/target/loopback/tcm_loop.c
+++ b/drivers/target/loopback/tcm_loop.c
@@ -266,7 +266,7 @@ static int tcm_loop_change_queue_depth(
* Main entry point from struct scsi_host_template for incoming SCSI CDB+Data
* from Linux/SCSI subsystem for SCSI low level device drivers (LLDs)
*/
-static int tcm_loop_queuecommand(
+static int tcm_loop_queuecommand_lck(
struct Scsi_Host *sh,
struct scsi_cmnd *sc)
{
@@ -310,6 +310,8 @@ static int tcm_loop_queuecommand(
return 0;
}
+static DEF_SCSI_QCMD(tcm_loop_queuecommand)
+
/*
* Called from SCSI EH process context to issue a LUN_RESET TMR
* to struct scsi_device
--
1.7.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] target: virtio_scsi: SCSI host lock push-down
2011-12-02 21:13 [PATCH] target: virtio_scsi: SCSI host lock push-down Sebastian Andrzej Siewior
@ 2011-12-02 21:43 ` Nicholas A. Bellinger
2011-12-02 21:45 ` Nicholas A. Bellinger
0 siblings, 1 reply; 4+ messages in thread
From: Nicholas A. Bellinger @ 2011-12-02 21:43 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: target-devel, linux-scsi, Jeff Garzik, James E.J. Bottomley
On Fri, 2011-12-02 at 22:13 +0100, Sebastian Andrzej Siewior wrote:
> Commit f281233d aka ("SCSI host lock push-down") was converting all
> drivers in tree. It looks to me that those two were not omitted on
> purpose. tcm_loop joined the tree after the conversion and virtio_scsi
> lives only in Nicholas' lio tree. So here is an equivalent change for
> those two.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
> Having a differnt callback name for converted and not converted users
> would probably make it easier to tell them apart.
>
> drivers/scsi/virtio_scsi.c | 4 +++-
> drivers/target/loopback/tcm_loop.c | 4 +++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 7946f40..4c577fa 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -151,7 +151,7 @@ static void virtscsi_map_cmd(struct virtio_scsi *vscsi, struct scsi_cmnd *sc,
> sg_set_buf(&sg[idx++], &cmd->footer, sizeof(cmd->footer));
> }
>
> -static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc)
> +static int virtscsi_queuecommand_lck(struct Scsi_Host *sh, struct scsi_cmnd *sc)
> {
> struct virtio_scsi *vscsi = shost_priv(sh);
> struct virtio_scsi_cmd *cmd;
> @@ -190,6 +190,8 @@ static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc)
> return ret;
> }
>
> +static DEF_SCSI_QCMD(virtscsi_queuecommand);
> +
> static struct scsi_host_template virtscsi_host_template = {
> .module = THIS_MODULE,
> .name = "Virtio SCSI HBA",
> diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
> index 5f69594..92ef58a 100644
> --- a/drivers/target/loopback/tcm_loop.c
> +++ b/drivers/target/loopback/tcm_loop.c
> @@ -266,7 +266,7 @@ static int tcm_loop_change_queue_depth(
> * Main entry point from struct scsi_host_template for incoming SCSI CDB+Data
> * from Linux/SCSI subsystem for SCSI low level device drivers (LLDs)
> */
> -static int tcm_loop_queuecommand(
> +static int tcm_loop_queuecommand_lck(
> struct Scsi_Host *sh,
> struct scsi_cmnd *sc)
> {
> @@ -310,6 +310,8 @@ static int tcm_loop_queuecommand(
> return 0;
> }
>
> +static DEF_SCSI_QCMD(tcm_loop_queuecommand)
> +
> /*
> * Called from SCSI EH process context to issue a LUN_RESET TMR
> * to struct scsi_device
Both of these are already running in 'hock_lock-less' mode as they
should be, and there is no reason why it should be using DEF_SCSI_QCMD()
in order to revert to holding hock_lock.
--nab
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target: virtio_scsi: SCSI host lock push-down
2011-12-02 21:43 ` Nicholas A. Bellinger
@ 2011-12-02 21:45 ` Nicholas A. Bellinger
2011-12-02 21:54 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 4+ messages in thread
From: Nicholas A. Bellinger @ 2011-12-02 21:45 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: target-devel, linux-scsi, Jeff Garzik, James E.J. Bottomley
On Fri, 2011-12-02 at 13:43 -0800, Nicholas A. Bellinger wrote:
> On Fri, 2011-12-02 at 22:13 +0100, Sebastian Andrzej Siewior wrote:
> > Commit f281233d aka ("SCSI host lock push-down") was converting all
> > drivers in tree. It looks to me that those two were not omitted on
> > purpose. tcm_loop joined the tree after the conversion and virtio_scsi
> > lives only in Nicholas' lio tree. So here is an equivalent change for
> > those two.
> >
> > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > ---
> > Having a differnt callback name for converted and not converted users
> > would probably make it easier to tell them apart.
> >
> > drivers/scsi/virtio_scsi.c | 4 +++-
> > drivers/target/loopback/tcm_loop.c | 4 +++-
> > 2 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> > index 7946f40..4c577fa 100644
> > --- a/drivers/scsi/virtio_scsi.c
> > +++ b/drivers/scsi/virtio_scsi.c
> > @@ -151,7 +151,7 @@ static void virtscsi_map_cmd(struct virtio_scsi *vscsi, struct scsi_cmnd *sc,
> > sg_set_buf(&sg[idx++], &cmd->footer, sizeof(cmd->footer));
> > }
> >
> > -static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc)
> > +static int virtscsi_queuecommand_lck(struct Scsi_Host *sh, struct scsi_cmnd *sc)
> > {
> > struct virtio_scsi *vscsi = shost_priv(sh);
> > struct virtio_scsi_cmd *cmd;
> > @@ -190,6 +190,8 @@ static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc)
> > return ret;
> > }
> >
> > +static DEF_SCSI_QCMD(virtscsi_queuecommand);
> > +
> > static struct scsi_host_template virtscsi_host_template = {
> > .module = THIS_MODULE,
> > .name = "Virtio SCSI HBA",
> > diff --git a/drivers/target/loopback/tcm_loop.c b/drivers/target/loopback/tcm_loop.c
> > index 5f69594..92ef58a 100644
> > --- a/drivers/target/loopback/tcm_loop.c
> > +++ b/drivers/target/loopback/tcm_loop.c
> > @@ -266,7 +266,7 @@ static int tcm_loop_change_queue_depth(
> > * Main entry point from struct scsi_host_template for incoming SCSI CDB+Data
> > * from Linux/SCSI subsystem for SCSI low level device drivers (LLDs)
> > */
> > -static int tcm_loop_queuecommand(
> > +static int tcm_loop_queuecommand_lck(
> > struct Scsi_Host *sh,
> > struct scsi_cmnd *sc)
> > {
> > @@ -310,6 +310,8 @@ static int tcm_loop_queuecommand(
> > return 0;
> > }
> >
> > +static DEF_SCSI_QCMD(tcm_loop_queuecommand)
> > +
> > /*
> > * Called from SCSI EH process context to issue a LUN_RESET TMR
> > * to struct scsi_device
>
> Both of these are already running in 'hock_lock-less' mode as they
> should be, and there is no reason why it should be using DEF_SCSI_QCMD()
> in order to revert to holding hock_lock.
Or host_lock even..
--nab
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] target: virtio_scsi: SCSI host lock push-down
2011-12-02 21:45 ` Nicholas A. Bellinger
@ 2011-12-02 21:54 ` Sebastian Andrzej Siewior
0 siblings, 0 replies; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2011-12-02 21:54 UTC (permalink / raw)
To: Nicholas A. Bellinger
Cc: target-devel, linux-scsi, Jeff Garzik, James E.J. Bottomley
On 12/02/2011 10:45 PM, Nicholas A. Bellinger wrote:
> On Fri, 2011-12-02 at 13:43 -0800, Nicholas A. Bellinger wrote:
>> Both of these are already running in 'hock_lock-less' mode as they
>> should be, and there is no reason why it should be using DEF_SCSI_QCMD()
>> in order to revert to holding hock_lock.
>
> Or host_lock even..
Thanks for clarifying.
> --nab
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-12-02 21:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-02 21:13 [PATCH] target: virtio_scsi: SCSI host lock push-down Sebastian Andrzej Siewior
2011-12-02 21:43 ` Nicholas A. Bellinger
2011-12-02 21:45 ` Nicholas A. Bellinger
2011-12-02 21:54 ` Sebastian Andrzej Siewior
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.