linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Khazhismel Kumykov <khazhy@google.com>,
	adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ext4: Return EIO on read error in ext4_find_entry
Date: Fri, 23 Jun 2017 08:26:03 -0400	[thread overview]
Message-ID: <20170623122603.jmvyw4oqkojcapv3@thunk.org> (raw)
In-Reply-To: <204110E6-EECE-4925-9020-EC6D9633C822@dilger.ca>

On Fri, Jun 23, 2017 at 12:33:02AM -0600, Andreas Dilger wrote:
> On Jun 22, 2017, at 22:43, Theodore Ts'o <tytso@mit.edu> wrote:
> > 
> >> On Thu, Jun 22, 2017 at 04:23:07PM -0700, Khazhismel Kumykov wrote:
> >> Previously, a read error would be ignored and we would eventually return
> >> NULL from ext4_find_entry, which signals "no such file or directory". We
> >> should be returning EIO.
> >> 
> >> Signed-off-by: Khazhismel Kumykov <khazhy@google.com>
> > 
> > Thanks, applied.
> 
> I don't necessarily agree that this is an improvement. 
> 
> If the requested entry is not in the bad block, this will return an
> error even if the file name could be found in another block. It
> would be better to save the error until the end and only return -EIO
> if the entry cannot be found.

The problem is that if we continue, successive reads may all take
seconds or minutes to fail, thus tieing up the process for a long
time.  If this process happens to be, say, the node's Kubernetes
management server it can take down the entire node (since if there is
a watchdog daemon which assumes that if the management server is down,
it's time to kill and reset the entire node), and the file system is,
say, a network file system error which should only kill the individual
job, and not the entire node, the results could be quite unfortunate.

By returning EIO right away, we can "fast fail".

   	     	       	     	    - Ted

  reply	other threads:[~2017-06-23 12:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22 23:23 [PATCH] ext4: Return EIO on read error in ext4_find_entry Khazhismel Kumykov
2017-06-23  4:43 ` Theodore Ts'o
2017-06-23  6:33   ` Andreas Dilger
2017-06-23 12:26     ` Theodore Ts'o [this message]
2017-06-23 21:36       ` Andreas Dilger
2017-06-23 22:33         ` Khazhismel Kumykov
2017-06-23 23:26           ` Theodore Ts'o
2017-06-23 23:34             ` Andreas Dilger
2017-06-24  0:24               ` Theodore Ts'o
2017-06-26 19:22                 ` Tahsin Erdogan
2017-06-26 20:45                   ` Andreas Dilger
2017-06-27 21:58       ` Pavel Machek

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=20170623122603.jmvyw4oqkojcapv3@thunk.org \
    --to=tytso@mit.edu \
    --cc=adilger.kernel@dilger.ca \
    --cc=adilger@dilger.ca \
    --cc=khazhy@google.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@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).