Re: How to know when file data has been flushed into disk?

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

 



Thanks for your reply.

That make sense. But at least ext3 needs to know when all data has
been flushed so that it can commit the meta data. Question is how can
ext3 knows that? The data flushing is done by flush daemon. There go
to be some way to notify ext3 that data is flushed. Where  is this
part of code in ext3 module?

Xin

On 4/7/06, Douglas McNaught <[email protected]> wrote:
> "Xin Zhao" <[email protected]> writes:
>
> > 3. Does sys_close() have to  be blocked until all data and metadata
> > are committed? If not, sys_close() may give application an illusion
> > that the file is successfully written, which can cause the application
> > to take subsequent operation. However, data flush could be failed. In
> > this case, file system seems to mislead the application. Is this true?
> > If so, any solutions?
>
> The fsync() call is the way to make sure written data has hit the
> disk.  close() doesn't guarantee that.
>
> -Doug
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux