From: Ted Ts'o <tytso@mit.edu>
To: Asdo <asdo@shiftmail.org>
Cc: Phil Turmel <philip@turmel.org>, NeilBrown <neilb@suse.de>,
linux-raid <linux-raid@vger.kernel.org>,
linux-ext4@vger.kernel.org
Subject: Re: Sync does not flush to disk!?
Date: Fri, 8 Jun 2012 14:28:26 -0400 [thread overview]
Message-ID: <20120608182826.GA31636@thunk.org> (raw)
In-Reply-To: <4FD204B0.3000204@shiftmail.org>
On Fri, Jun 08, 2012 at 03:57:04PM +0200, Asdo wrote:
>
> I might say that it seems to me a bad design: never before I saw a
> cache that is not updated by writes.
> Here the cache content is *older* than the data on the real devices!?
> if it was *newer*, there are known cases (writeback cache not
> flushed yet), but *older*... never seen.
It's not just a matter of keeping the caches in sync --- it's also a
simple matter of locking. If a file system is mounted on two systems
at the same time, there's no way (without using a cluster lock
manager, which is what a cluster file system like ocfs2 uses) to avoid
both systems from trying to modify a particular of the file system (an
inode or a directory, for example) at the same time.
As a result, there's no way for a local disk file system to know when
a block has been modified out from under it, so that it can update its
inode cache (where the in-memory inode data structure looks quite
different from the on-disk inode table).
There is overhead in using a cluster file system, since it has to do
all of these extra checks to see if the block device has gotten
magically modified out from under it. So that's why most people won't
use a cluster file system if it is only going to be mounted on one
system at a time.
But if you are going to have a file system mounted in both the guest
and host file system at the same time, you *have* to use a cluster
file system. Alternately, you could have the guest access the file
system as mounted on the host OS via NFS.
Regards,
- Ted
prev parent reply other threads:[~2012-06-08 18:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-08 9:53 Sync does not flush to disk!? Asdo
2012-06-08 11:39 ` Asdo
2012-06-08 12:33 ` NeilBrown
2012-06-08 13:49 ` Phil Turmel
2012-06-08 13:57 ` Asdo
2012-06-08 14:11 ` Jan Kara
2012-06-08 14:16 ` Jan Kara
2012-06-08 18:28 ` Ted Ts'o [this message]
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=20120608182826.GA31636@thunk.org \
--to=tytso@mit.edu \
--cc=asdo@shiftmail.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=philip@turmel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).