Re: start_transaction: Readonly filesystem error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've recently been able to get back to this issue and think I've found
the cause.  The fs_may_remount_ro() call in file_table.c used to verify
that a file system may be remounted RO checks the open file list of the
super block for any deleted files and any regular files open for writing.
However, tty_open() in ttyio.c moves tty files from this list onto a
tty_files list maintained per tty_struct immediately on open, apparently
for use in open tty reference counting.  So any open deleted terminal
devices files are not considered in the remount RO test and the remount
is permitted.  This then eventually gives ext3 indigestion when it goes
to release the deleted file on a now RO file system which should not
have been allowed to be remounted RO.

I've hacked together a fix which calls into the tty driver and iterates
over the open files in all processes, following the pattern __do_SAK()
in ttyio.c , and then called this to augment the fs_may_remount_ro() test to
include open deleted terminal files, but this approach seems rather
heavyweight.  Alternative fix suggestions would be quite welcome.

Mike Accetta
Laurel Networks, Inc.

------- Forwarded Message
Date:    Fri, 07 Mar 2003 15:16:45 -0500
From:    "Michael J. Accetta" <mja@laurelnetworks.com>
To:      ext3-users@redhat.com
Subject: start_transaction: Readonly filesystem error
Message: 1
Return-Path: <mail@redhat.com>
Delivered-To: ext3-users@listman.redhat.com
Sender:  ext3-users-admin@redhat.com
Precedence: bulk
List-Help: <mailto:ext3-users-request@redhat.com?subject=help>
List-Post: <mailto:ext3-users@redhat.com>
List-Subscribe: <https://listman.redhat.com/mailman/listinfo/ext3-users>, <mail
	  to:ext3-users-request@redhat.com?subject=subscribe>
List-Id: EXT3 Users Mailing List <ext3-users.redhat.com>
List-Unsubscribe: <https://listman.redhat.com/mailman/listinfo/ext3-users>, <ma
	  ilto:ext3-users-request@redhat.com?subject=unsubscribe>
List-Archive: <https://listman.redhat.com/pipermail/ext3-users/>


On a 2.4.17 (MontaVista 2.1) kernel using ext3, I recently starting seeing the
error

EXT3-fs error (device ide1(22,1)) in start_transaction: Readonly filesystem
EXT3-fs error (device ide1(22,1)) in ext3_delete_inode: Readonly filesystem

on a file system within 10-20 seconds after remounting it r/o.
Apparemtly a write is being deferred past the remount point and then
runs into problems when it is performed because the file system is now
remounted read-only.  I've done an lsof in that window and seen an open
deleted (special) file so I suspect the bug is in the remount to r/o being
permitted while the open deleted file is still in use, rather than ext3.
It looks like fs_may_remount_ro() tries to catch open deleted files but
is not noticing this case, for some reason.

Does this sound like any known bug to anyone?

Mike Accetta
Laurel Networks, Inc.




------- End of Forwarded Message



_______________________________________________

Ext3-users@redhat.com
https://listman.redhat.com/mailman/listinfo/ext3-users

[Index of Archives]         [Linux RAID]     [Kernel Development]     [Red Hat Install]     [Video 4 Linux]     [Postgresql]     [Fedora]     [Gimp]     [Yosemite News]

  Powered by Linux