From: "Xin Zhao" <uszhaoxin@gmail.com>
To: "Chris Mason" <chris.mason@oracle.com>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: how do versioning filesystems take snapshot of opened files?
Date: Tue, 3 Jul 2007 12:12:40 -0400 [thread overview]
Message-ID: <4ae3c140707030912m59fc956k9e4da94e173fa171@mail.gmail.com> (raw)
In-Reply-To: <20070703090946.49e6062f@think.oraclecorp.com>
Thanks for your reply.
Sounds like one has to stop or pause the applications to get
consistent snapshot? But you look around, you may find that many
systems claim that they can take snapshot without shutdown the
application. Actually, I think it is impractical to require that app
to be shutdown before taking snapshot in a commercial environment.
Pausing apps is possible from the filesystem perspective. A simple
solution is that the filesystem stop writing any data to disk from the
point that the snapshotting command is received. But as we discussed
earlier, this is not sufficient to prevent a file from containing part
of old data and part of new data.
That's why I am so confused how can these systems provide consistent
snapshotting capability without sacrificing system performance much.
On 7/3/07, Chris Mason <chris.mason@oracle.com> wrote:
> On Tue, 3 Jul 2007 01:28:57 -0400
> "Xin Zhao" <uszhaoxin@gmail.com> wrote:
>
> > Hi,
> >
> >
> > If a file is already opened when snapshot command is issued, the file
> > itself could be in an inconsistent state already. Before the file is
> > closed, maybe part of the file contains old data, the rest contains
> > new data.
> > How does a versioning filesystem guarantee that the file snapshot is
> > in a consistent state in this case?
> >
> > I googled it but didn't find any answer. Can someone explain it a
> > little bit?
>
> It's the same answer as in most filesystem related questions...it
> depends ;) Consistent state means many different things. It may mean
> that the metadata accurately reflects the space on disk allocated to
> the file and that all data for the file is properly on disk (ie from an
> fsync).
>
> But, even this is less than useful because very few files on the
> filesystem stand alone. Applications spread their state across a
> number of files and so consistent means something different to
> every application.
>
> Getting a snapshot that is useful with respect to application data
> requires help from the application. The app needs to be shutdown or
> paused prior to the snapshot and then started up again after the
> snapshot is taken.
>
> -chris
>
>
>
next prev parent reply other threads:[~2007-07-03 16:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-03 5:28 how do versioning filesystems take snapshot of opened files? Xin Zhao
[not found] ` <778391c50707022236v5157a933qea1994cf4cbce879@mail.gmail.com>
2007-07-03 5:44 ` Xin Zhao
2007-07-03 13:09 ` Chris Mason
2007-07-03 16:12 ` Xin Zhao [this message]
2007-07-03 16:35 ` Bryan Henderson
2007-07-03 16:24 ` Bryan Henderson
2007-07-03 16:31 ` Xin Zhao
2007-07-03 17:04 ` Chris Mason
2007-07-03 17:15 ` Xin Zhao
2007-07-03 17:38 ` Chris Mason
2007-07-03 21:06 ` Bryan Henderson
2007-07-03 21:17 ` Xin Zhao
2007-07-03 22:02 ` Neil Brown
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=4ae3c140707030912m59fc956k9e4da94e173fa171@mail.gmail.com \
--to=uszhaoxin@gmail.com \
--cc=chris.mason@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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).