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

RE: ext3 sync problem

Hi Stephen:

Thanks for the reply. Two questions:
1. Could you give me a pointer to the patch that flushes ext3 journal
explicitly? I'd like an enhanced "sync" behavior that flushes everything to
the disk.
2. Is there a way to sync metadata as well as data?

Probably 1 and 2 are the same question....

Thanks a lot.

If this problem cannot be solved, I may have to go back to ext2. Yes it
takes more time to do fsck but or a 512M flash with 4 partitions it takes 11
seconds which is not that bad - and ext2 is in general more stable and

I'm also wondering how many people are using ext3 on flash. Is there any
better alternatives (like FAT maybe?)


> -----Original Message-----
> From: Stephen C. Tweedie [mailto:sct redhat com]
> Sent: Tuesday, September 17, 2002 12:58 AM
> To: Hua Zhong
> Cc: ext3-users redhat com
> Subject: Re: ext3 sync problem
> Hi,
> On Mon, Sep 16, 2002 at 10:07:30PM -0700, Hua Zhong wrote:
> > Here I have a problem with how sync works on ext3. Basically I
> am using ext3
> > and GRUB on flash. What happens is:
> >
> > 1. ftp two big boot images into ext3 (on a flash)
> > 2. do sync
> > 3. reset immediately (without umounting)
> > 4. GRUB cannot find the two images
> > 5. boot with another image, and the two images are there (b/c
> journal was
> > replayed)
> Yep.  sync() makes sure that the data is on the disk, but some of it
> is still allowed to be in the journal at that point.  That means that
> it's in the filesystem, but not where grub expects to find it.
> I've already got a hack in ext3 to solve this for lilo --- whenever
> ext3 gets a bmap() request (which asks us to return the absolute
> location for the block on disk), if the file has been dirtied then it
> flushes it out of the journal and onto permanent storage.
> > My first thinking was that ext3 sync doesn't sync all the data
> but probably
> > just the journal, but I asked ext3 maintainer and he said ext3
> sync all the
> > data not just the journal, so I get confused.
> It _does_ sync the data.  The problem is metadata.  The data is in the
> right place but the inodes, indirect blocks and directory entries
> which refer to that data are still in the journal.
> Cheers,
>  Stephen

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