Re: [PATCH v6 10/13] Make scsi_remove_host() wait for device removal

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

 



On 12/03/12 17:42, Tejun Heo wrote:
On Mon, Dec 03, 2012 at 05:38:52PM +0100, Bart Van Assche wrote:
It is indeed possible to invoke complete() only if the device list
became empty with the host state equal to SHOST_CANCEL,
SHOST_CANCEL_RECOVERY, SHOST_DEL or SHOST_DEL_RECOVERY and in

We can test this with !scsi_host_scan_allowed(), right?

scsi_remove_host() to wait for that completion only if the device
list was not empty before the host state was changed into one of the
four mentioned states. Do you really prefer this approach over the
approach in the patch at the start of this thread ?

Maybe I'm missing something but if possible completion tends to be
much simpler than using waitqueue directly.  I *think* that's the case
here.  Am I missing something?

Hello Tejun,

You are right that it should be possible to use a completion in this context instead of a wait queue. However, I'm not enthusiast about using a completion for this patch because it would mean introducing several additional if-statements. Such if-statements would make this patch even harder to test then it already is now.

Note: all your other review comments should have been addressed in v7 of this patch series.

Bart.

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