From: Johannes Thumshirn <jthumshirn@suse.de>
To: John Garry <john.garry@huawei.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Hannes Reinecke <hare@suse.de>,
Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
Linux SCSI Mailinglist <linux-scsi@vger.kernel.org>,
wangyijing@huawei.com, Linuxarm <linuxarm@huawei.com>
Subject: Re: [PATCH] scsi: sas: scsi_queue_work can fail, so make callers aware
Date: Wed, 14 Jun 2017 15:05:10 +0200 [thread overview]
Message-ID: <70f96f2d-e47f-a187-36ca-68127290897b@suse.de> (raw)
In-Reply-To: <1d42fe4e-f6fb-17f5-946f-a44637000372@huawei.com>
On 06/14/2017 02:57 PM, John Garry wrote:
> On 14/06/2017 12:52, Johannes Thumshirn wrote:
>> libsas uses scsi_queue_work() to queue it's internal event
>> notifications. scsi_queue_work() can return -EINVAL if the work queue
>> doesn't exist and it does call queue_work() which can return false if
>> the work is already queued.
>>
>
> Hi Johannes,
>
> When the queuing fails and we an report error, what is the caller, i.e.
> the LLDD, supposed to do with this information?
>
> I mean, the LLDD is just reporting an event, like a broadcast event, and
> libsas could not handle it for some reason. The LLDD probably does not
> know how to handle this, apart from printing an error or maybe even
> disabling the originating PHY.
This depends on the event and the LLDD I guess. If it's -EINVAL (a.k.a
SCSI work queue not present) there's not much an LLDD can do about. If
it's a plain false, we could for instance report that we re-queue an
event or something similar.
>> Make the SAS event code capable of returning errors up to the caller,
>> which is handy when changing to dynamically allocated work in libsas
>> as well, as discussed here: https://lkml.org/lkml/2017/6/14/121.
>
> I will comment on this patchset separately.
It's merrily a preparation patch for this libsas patchset and IFF we
want to merge it that way.
Should've made it clear in the log, sorry.
--
Johannes Thumshirn Storage
jthumshirn@suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
next prev parent reply other threads:[~2017-06-14 13:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 11:52 [PATCH] scsi: sas: scsi_queue_work can fail, so make callers aware Johannes Thumshirn
2017-06-14 12:57 ` John Garry
2017-06-14 13:05 ` Johannes Thumshirn [this message]
2017-06-28 1:28 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70f96f2d-e47f-a187-36ca-68127290897b@suse.de \
--to=jthumshirn@suse.de \
--cc=hare@suse.de \
--cc=john.garry@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=martin.petersen@oracle.com \
--cc=wangyijing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox