Re: [PATCH 3/7] scsi_dh: add generic SPC-3 alua handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux