From: Dave Kleikamp <shaggy@austin.ibm.com>
To: fs <fs@ercist.iscas.ac.cn>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>,
viro VFS <viro@parcelfarce.linux.theplanet.co.uk>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
zhiming@admin.iscas.ac.cn, qufuping@ercist.iscas.ac.cn,
madsys@ercist.iscas.ac.cn, xuh@nttdata.com.cn,
koichi@intellilink.co.jp, kuroiwaj@intellilink.co.jp,
okuyama@intellilink.co.jp, matsui_v@valinux.co.jp,
kikuchi_v@valinux.co.jp, fernando@intellilink.co.jp,
kskmori@intellilink.co.jp, takenakak@intellilink.co.jp,
yamaguchi@intellilink.co.jp, ext2-devel@lists.sourceforge.net,
sct@redhat.com, xfs-masters@oss.sgi.com, reiser@namesys.com
Subject: Re: [RFD] FS behavior (I/O failure) in kernel summit
Date: Tue, 14 Jun 2005 08:22:33 -0500 [thread overview]
Message-ID: <1118755353.7956.21.camel@localhost> (raw)
In-Reply-To: <1118692436.2512.157.camel@CoolQ>
On Mon, 2005-06-13 at 15:53 -0400, fs wrote:
> 1) When I/O failure occurs(e.g.: unrecoverable media failure - USB
> unplug), FS should
> a. shutdown the FS right now(XFS does this)
> b. try to make the media serve as long as possible(EXT3 remounts
> read-only, cache is still valid for read)
> c. do not care, just print some kernel debugging info(EXT2 JFS
> ReiserFS)
In practice, JFS will typically do b. In some cases, an operation may
simply return -EIO (or not even that if the write is asynchronous), but
eventually, a failure to read or write metadata will lead to the file
system being mounted read-only. Like ext2/3, this behavior is
configurable with the errors= mount option.
It's possible that JFS may behave like c for a short time, or if an I/O
error is isolated.
> 2) When I/O failure occurs, FS should
> a. give a unified error
> b. give errors according to the FS type
>
> 3) the returned errno should be
> a. real cause of failure, e.g. USB unplug returns EIO
> b. cause from FS, e.g. USB unplug made FS remount read-only,
> so open(O_RDONLY) returns ENOENT while open(O_RDWR) returns
> EROFS
> c. errno means nothing, you already get -1, that's enough
I'm not sure I understand the difference between 2) & 3).
If 1)b. applies, then 3)b. makes sense. The initial error causes the
file system to be mounted read-only. The original error is history, so
any additional errors must make sense in the current context. Trying to
write to a read-only filesystem should return -EROFS. Any new I/O
errors may return -EIO. I'm not sure about -ENOENT, but it probably
makes sense from the context of the code returning the error.
> Unfortunately, recent kernel FSes give mixed answers to the above
> questions. As an end user/developer, this is really BAD! Also, there's
> no correspondent docs/standard, 'de facto' standard varies for different
> people.
>
> So, we propose 1)a 2)a 3)a as the right behavior. We really hope FS
> maintainers can give us a unified answer on this issue, or AT LEAST
> positive feedback. If possible, have a discussion in the Kernel Summit.
I don't agree. I think 1)b is the most useful for most purposes. Most
users would like to be able to recover as much data as possible if a
disk starts failing. Allowing the volume to remain mounted read-only
allows this without risking further damage to the file system.
--
David Kleikamp
IBM Linux Technology Center
prev parent reply other threads:[~2005-06-14 13:23 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-13 19:53 [RFD] FS behavior (I/O failure) in kernel summit fs
2005-06-13 17:59 ` Hans Reiser
2005-06-13 20:13 ` [Ext2-devel] " Andreas Dilger
2005-06-13 23:56 ` Hans Reiser
2005-06-14 2:46 ` Kenichi Okuyama
2005-06-15 14:01 ` Theodore Ts'o
2005-06-15 19:40 ` Kenichi Okuyama
2005-06-15 20:29 ` Bernd Eckenfels
2005-06-15 20:37 ` Theodore Ts'o
2005-06-15 20:38 ` Hans Reiser
2005-06-15 22:53 ` Theodore Ts'o
2005-06-16 19:08 ` Hans Reiser
2005-06-16 11:52 ` Helge Hafting
2005-06-16 19:52 ` Hans Reiser
2005-06-16 21:27 ` Pavel Machek
2005-06-16 11:38 ` Matthew Wilcox
2005-06-14 12:51 ` Erik Mouw
2005-06-14 17:16 ` Kenichi Okuyama
2005-06-14 20:17 ` Szakacsits Szabolcs
2005-06-14 3:46 ` [Ext2-devel] " Valdis.Kletnieks
2005-06-14 17:41 ` fs
2005-06-13 21:51 ` Jeff Mahoney
2005-06-14 0:03 ` Hans Reiser
2005-06-15 17:39 ` Jeff Mahoney
2005-06-16 2:18 ` Dave Chinner
2005-06-16 15:21 ` Jeff Mahoney
2005-06-16 18:52 ` Hans Reiser
2005-06-14 13:22 ` Dave Kleikamp [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=1118755353.7956.21.camel@localhost \
--to=shaggy@austin.ibm.com \
--cc=akpm@osdl.org \
--cc=ext2-devel@lists.sourceforge.net \
--cc=fernando@intellilink.co.jp \
--cc=fs@ercist.iscas.ac.cn \
--cc=kikuchi_v@valinux.co.jp \
--cc=koichi@intellilink.co.jp \
--cc=kskmori@intellilink.co.jp \
--cc=kuroiwaj@intellilink.co.jp \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=madsys@ercist.iscas.ac.cn \
--cc=matsui_v@valinux.co.jp \
--cc=okuyama@intellilink.co.jp \
--cc=qufuping@ercist.iscas.ac.cn \
--cc=reiser@namesys.com \
--cc=sct@redhat.com \
--cc=takenakak@intellilink.co.jp \
--cc=torvalds@osdl.org \
--cc=viro@parcelfarce.linux.theplanet.co.uk \
--cc=xfs-masters@oss.sgi.com \
--cc=xuh@nttdata.com.cn \
--cc=yamaguchi@intellilink.co.jp \
--cc=zhiming@admin.iscas.ac.cn \
/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