public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Shaya Potter <spotter@cs.columbia.edu>
To: Jamie Lokier <jamie@shareable.org>
Cc: Christoph Hellwig <hch@infradead.org>, linux-fsdevel@vger.kernel.org
Subject: Re: which dentry a page belongs to
Date: Sun, 25 Apr 2004 01:23:03 -0400	[thread overview]
Message-ID: <1082870582.12790.8.camel@zaphod> (raw)
In-Reply-To: <20040423224947.GC8915@mail.shareable.org>

On Fri, 2004-04-23 at 23:49 +0100, Jamie Lokier wrote:
> Shaya Potter wrote:
> > OK, great example, now I see the problem which can't be easily solved.
> > 
> > update-data
> > ioctl
> > update-data
> > writepage()
> > 
> > writepage can't differentiate b/w data b4 and data after, so only way to
> > do it would be to force a sync b4 ioctl is called, which I would think
> > (perhaps wrong) should write out all the data to disk.  But unsure if
> > prorgramatically able to really test to see if it worked or not.
> 
> "sync" doesn't do anything to help.

right.

> In general, first "update-data" in your example doesn't count as a
> "write" and it wouldn't be logical for a program to expect it to be
> snapshotted.  It counts as the program queuing up data which it does
> not expect to be visible in the file until the next msync, munmap or
> exit (although it is visible to other concurrent mmaps, and it _might_
> be visible in the file, of parts of it might).

right.

But as I just realized, for my purposes it doesn't matter much.  The
file system I'm working on is to go together with ZAP, which is our
kernel based process checkpoint/restart/migration infrastructure.  We
wanted a versioning fs to go with it so we aren't stuck just doing
checkpoint ; restart ; checkpoint ; restart, but could checkpoint many
times in a row and restart many times from a single arbitrary checkpoint
(not just the last one)

One thing we have to do, even right now, is checkpoint all dirty pages
associated with a process.  Hence the right thing to do after a
snapshot/version would be to version immediately in writepage() as the
process checkpoint code will have taken care of saving the dirty pages
(and the restart code will take care of restoring them and marking them
dirty).

though I'm guessing it be a slightly different story for write() if that
uses the writepage() interface as the pages will be "anonymous" (i.e.
not mapped inside a process)


  reply	other threads:[~2004-04-25  5:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-23 14:57 which dentry a page belongs to Shaya Potter
2004-04-23 15:14 ` Jamie Lokier
2004-04-23 15:42   ` Shaya Potter
2004-04-23 16:37     ` Christoph Hellwig
2004-04-23 16:52       ` Shaya Potter
2004-04-23 17:01         ` Christoph Hellwig
2004-04-23 17:18           ` Shaya Potter
2004-04-23 17:22             ` Christoph Hellwig
2004-04-23 17:32               ` Shaya Potter
2004-04-23 17:37             ` Jamie Lokier
2004-04-23 17:59               ` Shaya Potter
2004-04-23 22:13                 ` Jamie Lokier
2004-04-23 18:05               ` Shaya Potter
2004-04-23 21:37                 ` Jamie Lokier
2004-04-23 22:26                   ` Shaya Potter
2004-04-23 22:49                     ` Jamie Lokier
2004-04-25  5:23                       ` Shaya Potter [this message]
2004-04-25 23:22                         ` Erez Zadok
2004-04-24  8:53           ` Jan Hudec
2004-04-24  8:44       ` Jan Hudec
2004-04-24  9:20         ` Christoph Hellwig
2004-04-24  9:32           ` Jan Hudec

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=1082870582.12790.8.camel@zaphod \
    --to=spotter@cs.columbia.edu \
    --cc=hch@infradead.org \
    --cc=jamie@shareable.org \
    --cc=linux-fsdevel@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