Re: [PATCH 1/5] SCSI scanning and removal fixes

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

 



On Wed, 7 Sep 2005, James Bottomley wrote:

> Actually, alloc_target is properly guarded so it doesn't need the scan
> mutex.  It might be nice to update the SDEV_ state model to include a
> "scanning" state, that way we could properly guard the sdev_alloc as
> well and dump the scan mutex ... that's probably more than a slight
> change, though.

Probably not a good idea, either.  The "scanning" state applies to the 
host, not a particular device -- the idea is to prevent one thread from 
adding new devices while another thread is trying to get rid of all the 
devices because the host is going away.  (Not to mention, preventing two 
threads from adding the same target at the same time!)

And this needs to be a mutex, since host removal must wait until scanning 
finishes.  Making it a state instead won't work well.

> > Would you like me to submit an updated patch?
> 
> Yes, please.  It's been suggested that we should have a scsi_add_target
> that returns zero on success or error on failure (with no ref to the
> sdev) and keep the old behaviour of __scsi_add_target().

On Wed, 7 Sep 2005, Mike Anderson wrote:

> On as542. The first hunk of the diff is already in (declare of
> scsi_host_set_state). The second hunk looks good (SHOST_RECOVERY label).
> The third hunk I will take in combination with the other patch that
> effects the scan code. This should have probably been
> another patch.

At this point, maybe it's best for me to step back and let Mike look 
through the issues first.  There's Patrick's patch to be combined with the 
one I sent, and other things that need to be straightened out.

Alan Stern

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