From: Andi Kleen <ak@muc.de>
To: Junfeng Yang <yjf@stanford.edu>
Cc: mc@cs.Stanford.EDU, linux-kernel@vger.kernel.org
Subject: Re: [CHECKER] Does sys_sync (ext2, 2.6.x) flush metadata?
Date: Fri, 11 Feb 2005 13:44:34 +0100 [thread overview]
Message-ID: <m1wttfuuz1.fsf@muc.de> (raw)
In-Reply-To: <Pine.GSO.4.44.0502102345540.8091-100000@elaine24.Stanford.EDU> (Junfeng Yang's message of "Thu, 10 Feb 2005 23:59:53 -0800 (PST)")
Junfeng Yang <yjf@stanford.edu> writes:
> We're working on a file system checker and have a question regarding what
> sys_sync actually does. It appears to us that sys_sync should sync both
> data and metadata, and wait until both data and metadata hit the disk
> before it returns. Is this true for all the file systems (especially
> ext2) for kernel 2.6.x? I've gotten many "error" traces for ext2, where
> directory entries are not flushed to disk after sys_sync. In other words,
> even if users do call sys_sync, a crash after sys_sync call can still
> cause file losses. Is this intended?
No, it would be a bug. sync() is supposed to flush everything.
In the ext2 case directory changes should be hold in a dirty buffer,
which sync should normally flush.
-Andi
next prev parent reply other threads:[~2005-02-11 12:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-11 7:59 [CHECKER] Does sys_sync (ext2, 2.6.x) flush metadata? Junfeng Yang
2005-02-11 10:14 ` Andrew Morton
2005-02-11 12:44 ` Andi Kleen [this message]
2005-02-11 13:17 ` Bartlomiej Zolnierkiewicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1wttfuuz1.fsf@muc.de \
--to=ak@muc.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mc@cs.Stanford.EDU \
--cc=yjf@stanford.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.