sync in-cache fs data after remount ro on error?

Ed L Cashin ecashin at
Fri Oct 19 16:57:15 UTC 2007

Hi.  If a block device stops working and then starts working later,
does the sysadmin have a way to ask ext3 to sync the now read-only
filesystem to disk?

For example, I can temporarily shut down the network interfaces that
make an AoE target accessible (simulating, e.g., somebody accidentally
unplugging a network switch).  When the I/O fails, the filesystem is
automatically mounted read-only, which is great.

But if valuable data has been committed to the in-cache filesystem but
not the on-disk filesystem, it would ideally be possible to remount
the filesystem read-write once the device is online again (from
running aoe-revalidate), so that the new data could be sync'ed out to

The mount command won't remount the ext3 read-write.

  ellijay:~# mount -o remount,rw /mnt/e7.1
  mount: block device /dev/etherd/e7.1 is write-protected, mounting read-only

A kernel message says, "Abort forced by user", which looks like it is
coming from fs/ext3/super.c,

	if (sbi->s_mount_opt & EXT3_MOUNT_ABORT)
		ext3_abort(sb, __FUNCTION__, "Abort forced by user");

Checking the e2fsprogs manpages, I don't see a way to ask ext3 to stop
aborting a read-write mount.  If all the uncommitted in-cache data is
still marked as dirty, it seems like it might be possible to safely
commit it now that the sysadmin knows the block device is OK.

Is there a way to commit the dirty changes when the block device has
stopped failing I/O?

  Ed L Cashin <ecashin at>

More information about the Ext3-users mailing list