Re: ext3 sync problem

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

 



On Tue, Sep 17, 2002 at 03:24:31PM -0700, Hua Zhong wrote:
> 
> I don't quite understand here. As I understand it the only interaction
> between lilo (and any bootloader) and the OS is lilo loads OS and that's it.
> What do you mean by "lilo calls FIBMAP ioctl"?
> 

When installing a new kernel, you have to run "/sbin/lilo" so the
location of the blocks on disk stored in the LILO boot blocks.
(Unlike GRUB, LILO doesn't read the filesystem at boot time; instead
it uses the FIBMAP ioctl to discover the locations on disk used by the
kernel, and stores that in a location where the LILO boot-time code
can find it.)

> > It depends on what you mean, precisely.  The metadata is "synced" to the
> > journal.  The problem is really that GRUB is ignoring the fact that the
> > journal exists.  If the kernel were to mount the filesystem, or e2fsck
> > run on it, then the metadata in the journal would be flushed to disk.
> 
> I mean sync everything to disk so GRUB can see the change after reboot. It
> cannot be in the journal.

The problem is that GRUB is violating the rules, in that it is looking
at a filesystem that has the "needs recovery" bit set (i.e., that
there is data in the journal which must be replayed before the
fileystem is considered valid).  Most of the time, it gets lucky, in
that the parts of the filesystem it is interested in aren't affected
by the fact there is un-replayed data in the journal.  But what it is
doing is definitely not according to Hoyle.

What you want is a "flush journal" ioctl/operation, and that currently
doesn't exist, although it would be pretty trivial to code one up.
(it's basically a journal_lock_updates(), journal_flush(),
journal_unlock_updates() call.)

> > You are probably far better off to use JFFS2 or similar - it is a
> > journaled filesystem explicitly designed for flash devices, so it does
> > wear leveling and such (otherwise the journal + superblock will quickly
> > wear out part of the flash).

Actually most modern flash hardware takes care of doing the wear
leveling automatically.  Necessary, since so many flash memories are
used to store FAT filesystems (for example in digital cameras).

						- Ted



_______________________________________________

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