From: Chandra Seetharaman <sekharan@us.ibm.com>
To: Hannes Reinecke <hare@suse.de>
Cc: Jens Axboe <jens.axboe@oracle.com>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
linux-scsi@vger.kernel.org,
device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH 3/7] scsi_dh: add generic SPC-3 alua handler
Date: Fri, 16 May 2008 17:29:06 -0700 [thread overview]
Message-ID: <1210984146.21974.364.camel@chandra-ubuntu> (raw)
In-Reply-To: <20080516201830.GB16538@kernel.dk>
On Fri, 2008-05-16 at 22:18 +0200, Jens Axboe wrote:
> On Fri, May 16 2008, Chandra Seetharaman wrote:
> > It is a question to Jens :)
> >
> > On Thu, 2008-05-15 at 10:13 +0200, Hannes Reinecke wrote:
> > > Chandra Seetharaman wrote:
> > > > I do not know the functionality of this module. So, my comments are only
> > > > related to code.
> > > >
> > > > blk_request_rq() frees up the request before it returns (in
> > > > blk_end_sync_rq()). So, there is no need for blk_put_request().
My bad...
After Jens's comment, looked closely at blk_execute_rq() and
blk_end_sync_rq() and realized that there is an additional reference
acquired by blk_execute_rq() which is dropped later.
> > > >
> > > Indeed. But this opens up another question:
> > >
> > > By the time blk_execute_rq() returns, the request is already
> > > put back onto the queue.
> > > That means that I shouldn't access rq->errors any more, as
> > > the request might have been reused already.
> > > But blk_execute_rq() returns -EIO for any error, making it
> > > impossible to signal a proper error here.
> > > So how do I get the contents of rq->errors safely?
> > >
> > > Cheers,
> > >
> > > Hannes
>
> blk_get_request() and blk_put_request() when done. See how
> block/scsi_ioctl.c:sg_io() does just that.
>
next prev parent reply other threads:[~2008-05-17 0:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 14:43 [PATCH 3/7] scsi_dh: add generic SPC-3 alua handler Hannes Reinecke
2008-05-15 2:49 ` Chandra Seetharaman
2008-05-15 8:13 ` Hannes Reinecke
2008-05-16 18:37 ` Chandra Seetharaman
2008-05-16 20:18 ` Jens Axboe
2008-05-17 0:29 ` Chandra Seetharaman [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-05-20 14:05 Hannes Reinecke
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=1210984146.21974.364.camel@chandra-ubuntu \
--to=sekharan@us.ibm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=dm-devel@redhat.com \
--cc=hare@suse.de \
--cc=jens.axboe@oracle.com \
--cc=linux-scsi@vger.kernel.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