public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Kenichi Okuyama <okuyamak@dd.iij4u.or.jp>
Cc: Hans Reiser <reiser@namesys.com>,
	Andreas Dilger <adilger@clusterfs.com>,
	fs <fs@ercist.iscas.ac.cn>,
	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,
	shaggy@austin.ibm.com, xfs-masters@oss.sgi.com,
	Reiserfs developers mail-list <Reiserfs-Dev@namesys.com>
Subject: Re: [Ext2-devel] Re: [RFD] FS behavior (I/O failure) in kernel summit
Date: Wed, 15 Jun 2005 10:01:05 -0400	[thread overview]
Message-ID: <20050615140105.GE4228@thunk.org> (raw)
In-Reply-To: <42AE450C.5020908@dd.iij4u.or.jp>

On Tue, Jun 14, 2005 at 11:46:36AM +0900, Kenichi Okuyama wrote:
> I agree that kernel can not directly influence user.
> But, application may have better chance.
> 
> Think about case of editor (vi, emacs, almost any text editors are ok ).
> 
> If you try to save file, and recieve no error, user will believe they 
> have been written on disk they believe to be existing.
> Even log yells for error, user will not notice.
> 
> If editor recieve error, then user can know something is wrong. Though 
> he is still wondering, if he recieve the message
> like "Input Output Error: may be HW error?", he definitely will start 
> from looking at cable.

Kenichi-San,

Part of the problem is that we are limited by the constraints of the
POSIX specification for error handling.  For example, we don't have a
way of telling the application, "the reason why you the filesystem was
remounted-read-only was in reaction to an I/O error that appears to be
caused by the multiple CRC checksum errors reported by the SCSI
controller".  We can only return EIO or EROFS.  And while the write()
which causes an I/O error that remounts the filesystem read/only can
(and probably does) return EIO, any subsequent writes will return
EROFS, and changing this would be hard, hackish, and probably wouldn't
be accepted.

Also, there is not neccesarily one right answer to how to respond to a
underlying I/O error in the filesystem.  So for ext2/3 filesystem, it
is configurable.  In case of an underlying error detected in the
filesystem metadata, the filesystem can be set to either (a) panic and
force a reboot, so that hopefully fsck can resolve the issue, (b)
remount the filesystem read/only, to prevent further damage, or (c)
continue and do nothing (the don't worry, be happy approach).
Different users will want different approaches, and so trying to
standardize what applications will see at the user level doesn't seem
like the right approach, since we want to allow system administrators
some flexibility about how they wish to configure their systems.

(For example, an embedded system or a system where there is higher
levels of redundancy, the right answer might be to panic and either
reboot or halt --- continuing and possibly returning wrong answers
might be completely unacceptable, and it may be that the once the
system goes down hard, the adjacent backup blade can pick up
operations.)

So instead of trying to standardize the existing error returns, which
are they way they are and for which trying to standardize them would
probably be not worth the effort, since they don't return enough
context to the application anyway ---- I would suggest the better
thing to do is to design a new mechanism for returning block device
errors via either some kind of notifcation mechanism (pick your choice
of hotplug, dbus, or netlink --- dbus may make the most amount of
sense, since multiple applications may want to subscribe to such
notifications) of problems at the filesystem level, so that
applications can take corrective action as necessary.  

This is a better approach, since it far more flexible and returns much
more information to the user.  For example, in a desktop environment,
the desktop can pop up a warning dialog to the user of a failure of a
block device or filesystem corruption, without having to modify every
single application.  In the case of an embedded system, the
notification can trigger an appropriate failover or recovery process.  

Regards,

						- Ted

  reply	other threads:[~2005-06-15 14:01 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 [this message]
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

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=20050615140105.GE4228@thunk.org \
    --to=tytso@mit.edu \
    --cc=Reiserfs-Dev@namesys.com \
    --cc=adilger@clusterfs.com \
    --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=okuyamak@dd.iij4u.or.jp \
    --cc=qufuping@ercist.iscas.ac.cn \
    --cc=reiser@namesys.com \
    --cc=shaggy@austin.ibm.com \
    --cc=takenakak@intellilink.co.jp \
    --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