From: Khazhismel Kumykov <khazhy@google.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
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 15:33:46 -0700 [thread overview]
Message-ID: <CACGdZYJb4ouFMORaMTM5KubJv_SFpms35fXrTdAK0kxsa7-5Cg@mail.gmail.com> (raw)
In-Reply-To: <C37CE24B-A6E7-4B65-B0C4-4965B3C45007@dilger.ca>
[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]
On Fri, Jun 23, 2017 at 2:36 PM, Andreas Dilger <adilger@dilger.ca> wrote:
> On Jun 23, 2017, at 6:26 AM, Theodore Ts'o <tytso@mit.edu> wrote:
>>
>> 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.
>
> Sorry, I don't understand where the seconds or minutes of delay come from?
> Is that because of long SCSI retries in the block layer, or in the disk
> itself, or something caused specifically because of this code?
For a networked block device we may be retrying for a while before
giving up, although this also applies to the initial failed read.
>
>> By returning EIO right away, we can "fast fail".
>
> But it seems like you don't necessarily need to fail at all? Something like the
> following would return an error if the entry is not found, but still search the
> rest of the leaf blocks (if any) before giving up:
>
Giving up early or checking future blocks both work, critical thing
here is not returning NULL after seeing a read error.
Previously to this the behavior was to continue to check future blocks
after a read error, and it seemed OK.
Khazhy
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4843 bytes --]
next prev parent reply other threads:[~2017-06-23 22:33 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
2017-06-23 21:36 ` Andreas Dilger
2017-06-23 22:33 ` Khazhismel Kumykov [this message]
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=CACGdZYJb4ouFMORaMTM5KubJv_SFpms35fXrTdAK0kxsa7-5Cg@mail.gmail.com \
--to=khazhy@google.com \
--cc=adilger.kernel@dilger.ca \
--cc=adilger@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.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;
as well as URLs for NNTP newsgroup(s).