Re: [PATCH 17/21] libata: improve SCSI scan failure handling

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

 



Jeff Garzik wrote:
> Tejun Heo wrote:
>> SCSI scan may fail due to memory allocation failure even if EH is not
>> in progress.  Due to use of GFP_ATOMIC in SCSI scan path, allocation
>> failure isn't too rare especially while probing multiple devices at
>> once which is the case when a bunch of devices are connected to PMP.
>>
>> This patch moves SCSI scan failure detetion logic from
>> ata_scsi_hotplug() to ata_scsi_scan_host() and implement synchronous
>> scan behavior.  The synchronous path sleeps briefly and repeats SCSI
>> scan if some devices aren't attached properly.  It contains robust
>> retry loop to minimize the chance of device misdetection during boot
>> and falls back to async retry if everything fails.
>>
>> Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
>> ---
>>  drivers/ata/libata-core.c |    2 +-
>>  drivers/ata/libata-scsi.c |   63
>> +++++++++++++++++++++++++++++++++-----------
>>  drivers/ata/libata.h      |    2 +-
>>  3 files changed, 49 insertions(+), 18 deletions(-)
> 
> applied 17-21, though this one makes me nervous.  off to test upstream +
> patchset #1...  :)

The proper thing to do is updating SCSI scan code such that it doesn't
fail at nothing (SCSI likes GFP_ATOMIC too much it seems).  Anyways,
we're much safer with this patch but it's ugly as hell.  :-(

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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux