public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@sous-sol.org>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: Jean Delvare <jdelvare@suse.de>,
	linux-scsi@vger.kernel.org, Chris Wright <chrisw@sous-sol.org>,
	James Bottomley <James.Bottomley@hansenpartnership.com>
Subject: Re: [PATCH 7/7] libiscsi: fix iscsi pool error path
Date: Thu, 2 Apr 2009 08:27:15 -0700	[thread overview]
Message-ID: <20090402152715.GF18394@sequoia.sous-sol.org> (raw)
In-Reply-To: <49D4D68A.8080606@cs.wisc.edu>

* Mike Christie (michaelc@cs.wisc.edu) wrote:
>>> -	if (q->queue == ERR_PTR(-ENOMEM))
>>> +	if (IS_ERR(q->queue)) {
>>
>> This indeed solves the problem I had underlined before, but
>> introduces a new one. Right now the only error returned by kfifo_init
>> is -ENOMEM. This may however change in the future, and then the
>> above code would silently convert the other error code to -ENOMEM.
>> This might make it difficult to trace errors.
>
> What do you mean by converting other errors codes to -ENOMEM?

Jean means the goto label...it will jump to essentially return -ENOMEM.

>> I know this is all just theoretical, at the moment your code is
>> correct, but I don't much like relying on assumptions which are not
>> guaranteed to last. So I would rather cleanly transmit the error code
>> up to the caller, or change the calling convention of kfifo_init() to
>
> What do you mean by cleanly transmitting the error code up the caller?

It's handwavy here...meaning if kfifo_init returned some other
error for some other condition, propagating that up the stack to the
iscsi_pool_init() caller.  Probably not all that critical to return
ENOMEM vs someother errno in this case.

thanks,
-chris

  reply	other threads:[~2009-04-02 15:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01 18:11 iscsi bugfixes and cleanups michaelc
2009-04-01 18:11 ` [PATCH 1/7] cxgb3i - subscribe to error notification from cxgb3 driver michaelc
2009-04-01 18:11   ` [PATCH 2/7] cxgb3i - re-initialize ddp settings after chip reset michaelc
2009-04-01 18:11     ` [PATCH 3/7] cxgb3i - re-read ddp settings information " michaelc
2009-04-01 18:11       ` [PATCH 4/7] cxgb3i - close all tcp connections upon " michaelc
2009-04-01 18:11         ` [PATCH 5/7] cxgb3i -- merge cxgb3i_ddp into cxgb3i module michaelc
2009-04-01 18:11           ` [PATCH 6/7] cxgb3i: call ddp release function directly michaelc
2009-04-01 18:11             ` [PATCH 7/7] libiscsi: fix iscsi pool error path michaelc
2009-04-02 14:02               ` Jean Delvare
2009-04-02 15:15                 ` Mike Christie
2009-04-02 15:27                   ` Chris Wright [this message]
2009-04-02 16:05                     ` Mike Christie
2009-04-02 17:26                       ` Chris Wright

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=20090402152715.GF18394@sequoia.sous-sol.org \
    --to=chrisw@sous-sol.org \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=jdelvare@suse.de \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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