lkml.org 
[lkml]   [2005]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [Ext2-devel] Re: [RFD] FS behavior (I/O failure) in kernel summit
    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
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-06-16 13:42    [W:0.020 / U:31.188 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site