linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John T. Kohl" <jtk@us.ibm.com>
To: nfsv4 <nfsv4@linux-nfs.org>, fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFC] Support for stackable file systems on top of nfs
Date: Thu, 10 Nov 2005 16:57:06 -0500	[thread overview]
Message-ID: <200511102157.jAALv6mk020461@sumu.lexma.ibm.com> (raw)
In-Reply-To: <1131658825.8209.5.camel@localhost.localdomain> (message from Shaya Potter on Thu, 10 Nov 2005 16:40:24)

>>>>> "Shaya" == Shaya Potter <spotter@cs.columbia.edu> writes:

>>>>>> > On Thu, Nov 10, 2005 at 11:32:22AM -0600, Dave Kleikamp wrote:
Dave>> The following patch allows stackable file systems, such as ClearCase's
Dave>> mvfs, to run atop nfs.  mvfs has it's own file and inode structures, but
Dave>> points its inode->i_mapping to the lower file system's mapping.  This
Dave>> causes problems when nfs's address space operations try to extract the
Dave>> open context from file->private_data.
Dave>> 
Dave>> The patch adds a small overhead of checking the file structure to see if
Dave>> it contains an inode that is not the mapping's host.
Dave>> 
Dave>> I am curious if there are any other stackable file systems that could
Dave>> benefit from this.

John>> Let me explain a bit more what's going on here.  MVFS would like to do
John>> the same thing that CODA does.  In the file->mmap() operation, CODA and
John>> MVFS want to set up paging operations to be handled by the backing store
John>> inode.  See for example fs/coda/file.c:coda_file_mmap(), it sets
John>> coda_inode-> i_mapping = host_inode->i_mapping.
John>> 
John>> But this fails when host_inode is an NFS inode.  NFS assumes
John>> that when it gets paging operations, it can look at the file pointer
John>> passed to the address_space_operations' readpage function, and that file
John>> pointer will be for an open NFS file.  If NFS is a backing store inode,
John>> the file pointer is for the stacked file system's open file.
John>> 
John>> CODA certainly won't work today with NFS host inodes and mapped files.
John>> I'm not surprised nobody noticed, since that seems like a poor way to
John>> use CODA.  Using NFS backing store is a primary use case for ClearCase
John>> MVFS, so we noticed.

Shaya> I think you'd notice it on other file systems as well.  For instance, my
Shaya> experience is that GFS doesn't play nice w/ stackable file systems that
Shaya> try to stack on the a_ops.  On the other hand, it's ok if it just passes
Shaya> all page cache operations directly down to the lower file system.
Shaya> OCFS2, on the other hand, seems to play better w/ stacking on the a_ops.

Hmm, so thinking about this more, I think the minimal patch would only
change how the file structure is found for the address space operations,
and leave the other ones alone.  (And FYI, yes MVFS does have a (struct
file *) open on the backing store inode, and uses it for
non-mapping-related calls.)

-- 
John Kohl
Senior Software Engineer - Rational Software - IBM Software Group
Lexington, Massachusetts, USA
jtk@us.ibm.com
<http://www.ibm.com/software/rational/>

  reply	other threads:[~2005-11-10 21:57 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-10 17:32 [RFC] Support for stackable file systems on top of nfs Dave Kleikamp
2005-11-10 20:07 ` Christoph Hellwig
2005-11-10 21:35   ` John T. Kohl
2005-11-10 21:40     ` Shaya Potter
2005-11-10 21:57       ` John T. Kohl [this message]
2005-11-10 21:50     ` Christoph Hellwig
2005-11-11  2:31     ` Trond Myklebust
2005-11-11  4:04       ` Trond Myklebust
2005-11-11 13:45         ` John T. Kohl
2005-11-11 15:27           ` Charles P. Wright
2005-11-11 17:38             ` John T. Kohl
2005-11-14 15:56     ` David Howells
2005-11-10 21:24 ` Trond Myklebust
2005-11-10 21:36   ` Shaya Potter
2005-11-10 22:18     ` Trond Myklebust
2005-11-10 22:27       ` Shaya Potter
2005-11-10 22:40         ` Trond Myklebust
2005-11-11  0:12           ` Bryan Henderson
2005-11-11  1:30             ` Brad Boyer
2005-11-11  2:06             ` Trond Myklebust
2005-11-11 18:18               ` Bryan Henderson
2005-11-11 19:22                 ` Trond Myklebust
2005-11-11 21:57                   ` Bryan Henderson
2005-11-11 22:41                     ` Trond Myklebust
2005-11-14 19:02                       ` Bryan Henderson
2005-11-11 16:40             ` Nikita Danilov
2005-11-11 18:45               ` Bryan Henderson
2005-11-11 19:31                 ` Nikita Danilov
2005-11-11 19:42                   ` Trond Myklebust
2005-11-11 23:13                   ` Bryan Henderson
  -- strict thread matches above, loose matches on Subject: below --
2005-11-14  0:44 Nikolai Joukov
2005-11-14 16:02 ` David Howells
2005-11-14 20:48   ` Erez Zadok
2005-11-14 21:13     ` John T. Kohl
2005-11-14 21:32       ` Jamie Lokier
2005-11-14 16:11 ` John T. Kohl

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=200511102157.jAALv6mk020461@sumu.lexma.ibm.com \
    --to=jtk@us.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nfsv4@linux-nfs.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).