All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Jeff Liu <jeff.liu@oracle.com>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH]  Btrfs: return EUCLEAN rather than ENXIO once internal error has occurred for SEEK_DATA/SEEK_HOLE inquiry
Date: Thu, 9 Feb 2012 15:51:18 +1100	[thread overview]
Message-ID: <20120209045118.GE7479@dastard> (raw)
In-Reply-To: <4F3346CF.3090908@oracle.com>

On Thu, Feb 09, 2012 at 12:08:47PM +0800, Jeff Liu wrote:
> On 02/09/2012 11:46 AM, Jeff Liu wrote:
> 
> > By referring to http://linux.die.net/man/2/lseek, return ENXIO only
> > when "offset beyond EOF" for either SEEK_DATA or SEEK_HOLE inquiry.
> > But we return it in case of internal issue too if btrfs_get_extent_fiemap() failed
> > due to other issues.  This will confuse the user applications to be expecting ENXIO when
> > trying to find a specific data or hole location once it has occurred.
> > 
> > Thanks Dave for pointing that out in XFS thread.
> > 
> > This patch fix it to return EUCLEAN, or maybe another particular errno is more reasonable in Btrfs to indicate this fatal error?
> 
> Or maybe just return the error that was happened at internal routine, to
> give user more accurate error info, which is better?

Return the internal error unchanged - a failure to read the extent
list (EIO) is different to a corruption detected in the extent
map read from disk (EUCLEAN). Having a user report the appropriate
error makes our life much simpler when it comes to trying to
understand their problem....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2012-02-09  4:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09  3:46 [PATCH] Btrfs: return EUCLEAN rather than ENXIO once internal error has occurred for SEEK_DATA/SEEK_HOLE inquiry Jeff Liu
2012-02-09  4:08 ` Jeff Liu
2012-02-09  4:51   ` Dave Chinner [this message]
2012-02-09  6:06     ` Jeff Liu

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=20120209045118.GE7479@dastard \
    --to=david@fromorbit.com \
    --cc=jeff.liu@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.