linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs: fix read_one_chunk() return error code
Date: Fri, 6 Oct 2017 20:48:11 +0200	[thread overview]
Message-ID: <20171006184811.GC3521@twin.jikos.cz> (raw)
In-Reply-To: <20171006100443.20007-1-anand.jain@oracle.com>

On Fri, Oct 06, 2017 at 06:04:42PM +0800, Anand Jain wrote:
> EIO is for IO (RW) failures, use correct error return
> codes at two locations with in read_one_chunk(). Also
> adds a small cleanup.

This patch does 3 things, please split it, and drop the cleanup part.

1) switch add_missing_dev to ERR_PTR/IS_ERR return value and update
   callers
2) change return value from EIO to EINVAL in case a device is missing
   and mount is not degraded

I'm not sure that EINVAL is the right error code, as it's used when the
mount options are unrecognized or wrong. I agree that EIO is not the
right code either, as it's reserved for "true" IO errors. Possibly it
could be ENOENT or EAGAIN followed by the syslog message.

      parent reply	other threads:[~2017-10-06 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-06 10:04 [PATCH 1/2] btrfs: fix read_one_chunk() return error code Anand Jain
2017-10-06 10:04 ` [PATCH 2/2] btrfs: clean up btrfs_report_missing_device() usage Anand Jain
2017-10-06 18:48 ` David Sterba [this message]

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=20171006184811.GC3521@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).