All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bryn M. Reeves" <bmr@redhat.com>
To: Laurence Oberman <oberman.l@gmail.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: scsi_debug driver puzzle
Date: Mon, 31 Mar 2014 19:01:32 +0100	[thread overview]
Message-ID: <5339AD7C.3020302@redhat.com> (raw)
In-Reply-To: <CAAzz28gZtn5HaXwQvmvnyK0wAWn-9et8Z8ZL9HVYDvLqFv9ibA@mail.gmail.com>

On 03/31/2014 06:32 PM, Laurence Oberman wrote:
>   File         Line
> 0 scsi_debug.c 3551 int scsi_debug_queuecommand_lck(struct scsi_cmnd
> *SCpnt, done_funct_t done)
> 1 scsi_debug.c 3900 static DEF_SCSI_QCMD(scsi_debug_queuecommand)
> 2 scsi_debug.c 3912 .queuecommand =  scsi_debug_queuecommand,

Magical scsi_host.h macro as part of the effort to push host_lock down.
The macro creates a function named as its argument which takes and drops
the shost->host_lock around a call to the real queuecommand function:

        spin_lock_irqsave(shost->host_lock, irq_flags);
        scsi_cmd_get_serial(shost, cmd);
        rc = func_name##_lck (cmd,cmd->scsi_done);
        spin_unlock_irqrestore(shost->host_lock, irq_flags);

http://fpaste.org/90345/88875139/

Cheers,
Bryn.

      reply	other threads:[~2014-03-31 18:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 17:32 scsi_debug driver puzzle Laurence Oberman
2014-03-31 18:01 ` Bryn M. Reeves [this message]

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=5339AD7C.3020302@redhat.com \
    --to=bmr@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=oberman.l@gmail.com \
    /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.