linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bharata B Rao" <bharata.rao@gmail.com>
To: "Jan Blunck" <jblunck@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	bharata@linux.vnet.ibm.com
Subject: Re: [RFC PATCH 2/4] Mount changes to support union mount.
Date: Wed, 20 Jun 2007 14:23:30 +0530	[thread overview]
Message-ID: <344eb09a0706200153j3b856dcvb983218714d1eda0@mail.gmail.com> (raw)
In-Reply-To: <f5am1v$foi$2@sea.gmane.org>

(replying from a different ID as you didn't copy me on reply)

On 6/20/07, Jan Blunck <jblunck@suse.de> wrote:
> On Wed, 20 Jun 2007 11:22:41 +0530, Bharata B Rao wrote:
>
> > +/*
> > + * When propagating mount events to peer group, this is called under
> > + * vfsmount_lock. Hence using GFP_ATOMIC for kmalloc here.
> > + * TODO: Can we use a separate kmem cache for union_mount ?
> > + */
> > +struct union_mount *alloc_union_mount(struct vfsmount *src_mnt,
> > +     struct dentry *src_dentry, struct vfsmount *dst_mnt,
> > +     struct dentry *dst_dentry)
> > +{
> > +     struct union_mount *u;
> > +     u = kmalloc(sizeof(struct union_mount), GFP_ATOMIC);
> > +     if (!u)
> > +             return u;
> > +     u->dst_mnt = mntget(dst_mnt);
> > +     u->dst_dentry = dget(dst_dentry);
> > +     u->src_mnt = src_mnt;
> > +     u->src_dentry = dget(src_dentry);
> > +     INIT_LIST_HEAD(&u->hash);
> > +     INIT_LIST_HEAD(&u->list);
> > +     return u;
> > +}
>
> Hmm, you pin the dentries in memory until umount. This isn't good. Besides
> that this doesn't work with file systems that do invalidate their
> dentries. The file system must have a chance to replace the dentry in the
> union structure.

Yes, both top level and next level dentries are pinned until umount of
the upper layer. I was thinking if we could prune these from
prune_dcache(). What do you think ?

Ok, I haven't thought about filesystem invalidating the dentries. Yet
to understand the dentry invalidation, but would filesystem invalidate
an inuse dentry ?

Regards,
Bharata.
-- 
"Men come and go but mountains remain" -- Ruskin Bond.

  reply	other threads:[~2007-06-20  8:53 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-20  5:50 [RFC PATCH 0/4] New approach to VFS based union mount Bharata B Rao
2007-06-20  5:51 ` [RFC PATCH 1/4] Union mount documentation Bharata B Rao
2007-06-20  8:11   ` Jan Blunck
2007-06-20  9:09     ` Bharata B Rao
2007-06-20  5:52 ` [RFC PATCH 2/4] Mount changes to support union mount Bharata B Rao
2007-06-20  7:47   ` Jan Blunck
2007-06-20  8:53     ` Bharata B Rao [this message]
2007-06-21 16:40       ` Josef Sipek
2007-06-20  5:53 ` [RFC PATCH 3/4] Lookup " Bharata B Rao
2007-06-20  7:51   ` Jan Blunck
2007-06-20  8:56     ` Bharata B Rao
2007-06-20  5:54 ` [RFC PATCH 4/4] Directory listing support for union mounted directories Bharata B Rao
2007-06-20 12:09   ` Christoph Hellwig
2007-06-20 14:22     ` Trond Myklebust
2007-06-20 17:02       ` Christoph Hellwig
2007-06-20 17:44         ` Trond Myklebust
2007-06-30  9:43           ` Christoph Hellwig

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=344eb09a0706200153j3b856dcvb983218714d1eda0@mail.gmail.com \
    --to=bharata.rao@gmail.com \
    --cc=bharata@linux.vnet.ibm.com \
    --cc=jblunck@suse.de \
    --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).