Re: [PATCH 03/21] hpsa: abandon rescans on memory alloaction failures.

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

 



On 26.10.2015 15:32, Tomas Henzl wrote:
> On 26.10.2015 15:29, Don Brace wrote:
>> On 10/26/2015 09:24 AM, Tomas Henzl wrote:
>>> On 24.10.2015 21:52, Don Brace wrote:
>>>> Abandon and reschedule rescan process only if device inquiries
>>>> fail due to mem alloc failures, which are likely to occur for
>>>> all devices.
>>>>
>>>> Otherwise, skip device if inquiry fails for other reasons,
>>>> and continue rescanning process for other devices.
>>>>
>>>> Reviewed-by: Scott Teel <scott.teel@xxxxxxxx>
>>>> Reviewed-by: Justin Lindley <justin.lindley@xxxxxxxx>
>>>> Reviewed-by: Kevin Barnett <kevin.barnett@xxxxxxxx>
>>>> Signed-off-by: Don Brace <don.brace@xxxxxxxx>
>>>> ---
>>>>   drivers/scsi/hpsa.c |   24 +++++++++++++++++++-----
>>>>   1 file changed, 19 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
>>>> index 5dfb6cf..e1ee06d 100644
>>>> --- a/drivers/scsi/hpsa.c
>>>> +++ b/drivers/scsi/hpsa.c
>>>>
>>>> @@ -3799,11 +3804,20 @@ static void hpsa_update_scsi_devices(struct ctlr_info *h, int hostno)
>>>>   				continue;
>>>>   
>>>>   		/* Get device type, vendor, model, device id */
>>>> -		if (hpsa_update_device_info(h, lunaddrbytes, tmpdevice,
>>>> -							&is_OBDR)) {
>>>> +		rc = hpsa_update_device_info(h, lunaddrbytes, tmpdevice,
>>>> +							&is_OBDR);
>>>> +		if (rc == -ENOMEM) {
>>>> +			dev_warn(&h->pdev->dev,
>>>> +				"Out of memory, rescan stopped.\n");
>>> What about 'rescan deferred" instead of "rescan stopped?
>> I can do either "rescan deferred" or "rescan rescheduled"
> Do what you prefer, it's your language.

And with any option you may add -
Reviewed-by: Tomas Henzl <thenzl@xxxxxxxxxx>

Tomas

>
>>>   
>>>
>>>>   			h->drv_req_rescan = 1;
>>>> -			continue; /* skip it if we can't talk to it. */
>>>> +			goto out;
>>>>   		}
>>>> +		if (rc) {
>>>> +			dev_warn(&h->pdev->dev,
>>>> +				"Inquiry failed, skipping device.\n");
>>>> +			continue;
>>>> +		}
>>>> +
>>>>   		figure_bus_target_lun(h, lunaddrbytes, tmpdevice);
>>>>   		hpsa_update_device_supports_aborts(h, tmpdevice, lunaddrbytes);
>>>>   		this_device = currentsd[ncurrent];
>>>>
>>>> --
>>>> 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
>>> --
>>> 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
>> --
>> 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
> --
> 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

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