"W. Wilson Ho" wrote:

> Andreas Dilger wrote:
> >
> > >       Lastly, if a (single) user process creates files f1, f2, f3, ...
> > > in that order, does the file system guarantee the order of
> > > creation?  That is, is it possible that after a journal playback,
> > > that f2 is gone but f1 and f3 exist?
> >
> > I'm pretty sure this IS a guarantee of a journaling filesystem, otherwise
> > if f3 is a file inside a directory f2, you have an inconsistent filesystem
> > (i.e. missing blocks, unlinked file).  Granted, it is possible after a
> > crash that both f2 and f3 are gone, or all are gone, but that is not your
> > question.
>
>         Thanks for your reply!  Now, if I do the following:
>
> 1) create/write a large file data.tmp
> 2) sync
> 3) mv data.tmp data
> 4) touch data.stamp
>
>         If data.stamp survives a system crash, does it mean the content
> of data will be correct?

Yes.

>  Basically, I'd like to have some simple
> way (like stat'ing a file) to check if my large data file is
> corrupted.
>

Thanks,
vs


Reply via email to