From: Wang Shaoyan <stufever@gmail.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: linux-ext4@vger.kernel.org,
Wang Shaoyan <wangshaoyan.pt@taobao.com>, Ted Tso <tytso@mit.edu>,
Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] ext4: Set file system to read-only by I/O error threshold
Date: Mon, 20 Jun 2011 09:32:56 +0800 [thread overview]
Message-ID: <BANLkTim-1FfCZAm449zp5PpApbq027HGwYhoZBF0soZpJon9tQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1106181015180.4602@dhcp-27-109.brq.redhat.com>
2011/6/18 Lukas Czerner <lczerner@redhat.com>:
> Hi,
>
> so you're saying that you encounter I/O error on access(2) only with
> Ext3/4 with journal. So given that you're checking the error count in
> ext4_handle_error() which is called when I/O error happens I fail to see
> how this helps your case. Am I missing something ?
>
Only when access(2) return "Read-only file system", hadoop will mark
the disk as offline. For Ext4 no-journal mode, there is no jdb2 to set
the file system as
read-only when I/O error happens, so we set an threshold, when io
error number reach this number, we change the filesystem to read-only.
I use ext4_abort(), maybe it is wrong?
> Also I do not understand how this is helpful at all ? Usually when we
> hit I/O error we want to have predictable behavior set by the error=
> mount option, but with this patch we have absolutely unpredictable
> behaviour on errors, which is bad! Also we can end up with read-only
> file system even when errors=continue has been set.
>
In ext4 without journal, when the disk drops, the fs can't be
readonly. But in ext3/4 with journal, jbd2 will abort the filesystem,
change fs to be read-only. So we don't care what kind of error happen,
we just want to change fs to be read-only when there are too many
errors
> You can use atomic_t and get rid of the spinlock maybe ?
>
Yes, thanks
> The name for this function should rather be inc_sb_error_count().
Thanks
> I am not sure, but given that it it a "threshold" should not we trigger
> it when we hit the threshold and not threshold+1 ?
Thanks, I should use ">="
> Could you use better error message ? This does not say nothing about why
> it happened. Something about IO errors count reached the threshold ?
Yes, IO errors count reached the threshold, we need change fs to be readonly
> Maybe you can use atomic operations and get rid of the spin_lock.
spin_lock is just a "lazy approach"
--
Wang Shaoyan
next prev parent reply other threads:[~2011-06-20 1:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-17 12:08 [PATCH] ext4: Set file system to read-only by I/O error threshold stufever
2011-06-18 8:38 ` Lukas Czerner
2011-06-20 1:32 ` Wang Shaoyan [this message]
2011-06-21 14:48 ` Ted Ts'o
2011-06-21 15:58 ` Andreas Dilger
2011-06-20 13:36 ` Jan Kara
2011-06-20 14:12 ` Wang Shaoyan
2011-06-20 14:41 ` Jan Kara
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=BANLkTim-1FfCZAm449zp5PpApbq027HGwYhoZBF0soZpJon9tQ@mail.gmail.com \
--to=stufever@gmail.com \
--cc=jack@suse.cz \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=wangshaoyan.pt@taobao.com \
/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).