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

RE: ext3 sync problem



Hi Stephen:

> Hi,
>
> On Thu, Sep 26, 2002 at 06:22:18PM -0700, Hua Zhong wrote:
>
> > Sorry for a late reply - I was busy with other things. I coded up a tiny
> > module that does what you suggested to flush the journal and it
> worked like
> > a charm. Thanks a lot for the hint.
>
> Coding up a small C program which just bmap()s a file from /boot would
> have the same effect and would be much more portable!

Unfortunately FIBMAP only flushes the journal if ext3 is mounted as
data=journal mode. It does nothing for other modes. This is the piece of
code:

        if (EXT3_I(inode)->i_state & EXT3_STATE_JDATA) {
                flush the journal;
        }

Seems it doesn't care meta data journaling (makes sense to me, as bmap only
needs to know the data blocks).

Actually I tried this approach first but it didn't work.....or did I miss
something? Thanks.

> > My only remaining question is that: if I do a journal_flush(),
> do I need to
> > do a normal sync() as well to make sure all the meta data and data are
> > synced to disk?
>
> No, the ext3 flush code is always careful to wait for writes where
> necessary.
>
> Cheers,
>  Stephen





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