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

Shaya Potter wrote:
> > That means you can get no vmas in i_mmap{,shared} when doing
> > perfectly normal writable shared mappings.
> 
> just realized an insanely ugly solution would be for all mapped files to
> map inode -> dentry (with code that makes sure they are still valid, i.e
> if dentry gets deleted or renamed).  Since the page always has it's
> inode host, could figure it out via that.  Since relatively few mapped
> files (compared to amount of files on fs) shouldn't be a huge memory
> overhead.

It's not ugly, it's wrong.  You'd end up verson-controlling the wrong files.

It's obvious that you want:

    1. Program A opens ("/a/path1", O_RDWR);
    1. Program B opens ("/a/path2", O_RDWR);
    2. Program A calls mmap.
    3. Program B calls mmap.
    4. You call your fs version control ioctl.
    5. Program A updates data.
    6. Program A unmaps or exits, which transfers the dirty bits.
    7. Later, ->writepage is called.
    6. You store a versioned snapshot of "/a/path1".

Your "insanely ugly solution" could easily snapshot "/a/path2" instead.

-- Jamie

  reply	other threads:[~2004-04-23 22:14 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 [this message]
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
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=20040423221354.GB8915@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=spotter@cs.columbia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox