xfs-masters
[Top] [All Lists]

[xfs-masters] Re: [Ext2-devel] Re: [RFD] FS behavior (I/O failure) in ke

To: "Theodore Ts'o" <tytso@xxxxxxx>, Kenichi Okuyama <okuyamak@xxxxxxxxxxxxxx>, Hans Reiser <reiser@xxxxxxxxxxx>, Andreas Dilger <adilger@xxxxxxxxxxxxx>, fs <fs@xxxxxxxxxxxxxxxxxx>, linux-fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, linux-kernel <linux-kernel@xxxxxxxxxxxxxxx>, zhiming@xxxxxxxxxxxxxxxxx, qufuping@xxxxxxxxxxxxxxxxxx, madsys@xxxxxxxxxxxxxxxxxx, xuh@xxxxxxxxxxxxxx, koichi@xxxxxxxxxxxxxxxxx, kuroiwaj@xxxxxxxxxxxxxxxxx, okuyama@xxxxxxxxxxxxxxxxx, matsui_v@xxxxxxxxxxxxx, kikuchi_v@xxxxxxxxxxxxx, fernando@xxxxxxxxxxxxxxxxx, kskmori@xxxxxxxxxxxxxxxxx, takenakak@xxxxxxxxxxxxxxxxx, yamaguchi@xxxxxxxxxxxxxxxxx, ext2-devel@xxxxxxxxxxxxxxxxxxxxx, shaggy@xxxxxxxxxxxxxx, xfs-masters@xxxxxxxxxxx, Reiserfs developers mail-list <Reiserfs-Dev@xxxxxxxxxxx>
Subject: [xfs-masters] Re: [Ext2-devel] Re: [RFD] FS behavior (I/O failure) in kernel summit
From: Matthew Wilcox <matthew@xxxxxx>
Date: Thu, 16 Jun 2005 12:38:12 +0100
In-reply-to: <20050615140105.GE4228@xxxxxxxxx>
References: <1118692436.2512.157.camel@CoolQ> <42ADC99D.5000801@xxxxxxxxxxx> <20050613201315.GC19319@xxxxxxxxxxxxxxxxxxxxx> <42AE1D4A.3030504@xxxxxxxxxxx> <42AE450C.5020908@xxxxxxxxxxxxxx> <20050615140105.GE4228@xxxxxxxxx>
Reply-to: xfs-masters@xxxxxxxxxxx
Sender: xfs-masters-bounce@xxxxxxxxxxx
User-agent: Mutt/1.4.1i
On Wed, Jun 15, 2005 at 10:01:05AM -0400, Theodore Ts'o wrote:
> 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.

I wasn't quite sure why this would be so hard, so I took a look.  Here's
how it works:

In fs/ext2/super.c, we do:
        if (test_opt(sb, ERRORS_RO)) {
                printk("Remounting filesystem read-only\n");
                sb->s_flags |= MS_RDONLY;
        }

From here on, the VFS handles returning -EROFS (except for a couple
of ioctls and an xattr call).  So it's not under the control of the
individual filesystem.  One way of handling this would be to introduce a
new MS_ERRORS flag that allows the VFS to return -EIO instead of -EROFS
for a filesystem that contains errors.

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain


<Prev in Thread] Current Thread [Next in Thread>