Re: [PATCH] scsi_lib: don't decrement busy counters when inserting commands

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

 



On Fri, 2 Jan 2009, James Bottomley wrote:

> On Tue, 2008-12-16 at 23:55 -0600, michaelc@xxxxxxxxxxx wrote:
> > From: Mike Christie <michaelc@xxxxxxxxxxx>
> > 
> > This patch fixes a regression in scsi-misc introduced with:
> > 312efe5efcdb02d604ea37a41d965f32ca276d6a
> > [SCSI] simplify scsi_io_completion().
> > 
> > The problem is that in previous kernels scsi_io_completion would call
> > scsi_requeue_command, but now it can call scsi_queue_insert for
> > something like a UNIT_ATTENTION (for netapp targets we get
> > UNIT_ATTENTION when restarting a iscsi session). And scsi_queue_insert
> > will call scsi_device_unbusy, but in the scsi_io_completion code path
> > scsi_finish_command has already called this so we now end up
> > with invalid host, target and device busy values.
> > 
> > Patch was made over scsi-misc.
> 
> This is a bad bug, but not quite the way I'd like to fix it.  Whether
> the queue should be unbusied or not is really separate from the block
> action, so it should have its own flag (plus it's not really a flag many
> people should be using).  Since, really, the wrong use is confined to
> the defining file, how about this:

Seems entirely reasonable.  This points out the potential for trouble
when a non-expert (like me!) tries to modify a complicated subsystem.  
Still, many eyeballs and all that...

Thanks to both of you,

Alan Stern

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