linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: vandrove@vc.cvut.cz
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Denis V. Lunev" <den@sw.ru>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Alexey Dobriyan <adobriyan@gmail.com>,
	rjw@sisk.pl, trond.myklebust@fys.uio.no, gnome42@gmail.com,
	linux-kernel@vger.kernel.org, bfields@fieldses.org,
	den@openvz.org, Pavel Emelyanov <xemul@openvz.org>
Subject: Re: [PATCH 2.6.24-rc4] proc: Remove/Fix proc generic d_revalidate
Date: Mon, 10 Dec 2007 22:35:14 +0100	[thread overview]
Message-ID: <1197322514.475db112ac621@imap.vc.cvut.cz> (raw)
In-Reply-To: <20071210113519.00d4d361.akpm@linux-foundation.org>

Quoting Andrew Morton <akpm@linux-foundation.org>:

> On Mon, 10 Dec 2007 16:32:18 +0300 "Denis V. Lunev" <den@sw.ru> wrote:
> >
> 
> Plese don't top-post.  It makes replying to you rather awkward.
> 
> > could you, plz, check patch sent by Eric above in this thread.
> > 
> > I have tried it on my test node and it works for module you have
> > provided. The problem exists without it.
> > 
> 
> When Peter says "with your patch in place" I assume that he's referring to
> Eric's latest patch, namely.

Sorry, I was not clear.  No, I meant Eric's original patch.  Without
d_revalidate() problem does not occur.
                                                   Petr

> 
> --- a/fs/proc/generic.c~proc-remove-fix-proc-generic-d_revalidate
> +++ a/fs/proc/generic.c
> @@ -374,16 +374,9 @@ static int proc_delete_dentry(struct den
>  	return 1;
>  }
>  
> -static int proc_revalidate_dentry(struct dentry *dentry, struct nameidata
> *nd)
> -{
> -	d_drop(dentry);
> -	return 0;
> -}
> -
>  static struct dentry_operations proc_dentry_operations =
>  {
>  	.d_delete	= proc_delete_dentry,
> -	.d_revalidate	= proc_revalidate_dentry,
>  };
>  
>  /*
> 
> So we still have problems, it appears.
> 
> > 
> > Petr Vandrovec wrote:
> > > Eric W. Biederman wrote:
> > >> Ultimately to implement /proc perfectly we need an implementation
> > >> of d_revalidate because files and directories can be removed behind
> > >> the back of the VFS, and d_revalidate is the only way we can let
> > >> the VFS know that this has happened.
> > >>
> > >> So until we get a proper test for keeping dentries in the dcache
> > >> fix the current d_revalidate method by completely removing it.  This
> > >> returns us to the current status quo.
> > > 
> > > Hello,
> > >    I know that I'm late to the party, but mount points is not only
> > > problem with d_revalidate.  With your patch in place module below gets
> > > refcount incremented by two every time I do 'ls -la /proc/fs/vmblock'.
> > > 
> > >
> > > #include <linux/kernel.h>
> > > #include <linux/module.h>
> > > #include <linux/proc_fs.h>
> > > 
> > > static int vmblockinit(void) {
> > >    struct proc_dir_entry *controlProcDirEntry;
> > > 
> > >    /* Create /proc/fs/vmblock */
> > >    controlProcDirEntry = proc_mkdir("vmblock", proc_root_fs);
> > >    if (!controlProcDirEntry) {
> > >       printk(KERN_DEBUG "Bad...\n");
> > >       return -EINVAL;
> > >    }
> > >    controlProcDirEntry->owner = THIS_MODULE;
> > >    return 0;
> > > }
> > > 
> > > static void vmblockexit(void) {
> > >    remove_proc_entry("vmblock", proc_root_fs);
> > > }
> > > 
> > > module_init(vmblockinit);
> > > module_exit(vmblockexit);
> > > 
> > > 
> > > (code comes from VMware's vmblock module,
> > > http://sourceforge.net/project/showfiles.php?group_id=204462)
> > >                         Thanks,
> > >                             Petr
> > > 
> > > 
> 
> 
> 




  reply	other threads:[~2007-12-10 22:21 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-07  4:45 2.6.24-rc3-git4 NFS crossmnt regression Shane
2007-12-07 12:02 ` Andrew Morton
2007-12-07 18:14   ` Shane
2007-12-07 18:36     ` Shane
2007-12-07 18:46     ` Trond Myklebust
2007-12-07 18:55       ` Shane
2007-12-07 19:16         ` Shane
2007-12-07 19:39           ` Shane
2007-12-07 22:51             ` Trond Myklebust
2007-12-07 23:14               ` Andrew Morton
2007-12-07 23:35                 ` Eric W. Biederman
2007-12-07 23:43                 ` Rafael J. Wysocki
2007-12-08  0:00                   ` Alexey Dobriyan
2007-12-08  0:15                     ` Andrew Morton
2007-12-08  2:13                       ` Shane
2007-12-08  4:18                       ` Eric W. Biederman
2007-12-08  4:25                       ` [PATCH 2.6.24-rc4] proc: Remove/Fix proc generic d_revalidate Eric W. Biederman
2007-12-08 17:15                         ` Shane
2007-12-10  2:52                         ` Petr Vandrovec
2007-12-10 13:32                           ` Denis V. Lunev
2007-12-10 19:35                             ` Andrew Morton
2007-12-10 21:35                               ` vandrove [this message]
2007-12-08  4:39                     ` 2.6.24-rc3-git4 NFS crossmnt regression Eric W. Biederman
2007-12-09  0:20                   ` Maxim Levitsky
2007-12-09 19:50                     ` J. Bruce Fields
2007-12-10  5:03                     ` Neil Brown
2007-12-10 14:19                       ` Maxim Levitsky
2007-12-10 14:36                         ` J. Bruce Fields
2007-12-10 15:05                           ` Maxim Levitsky
2007-12-10 15:47                             ` J. Bruce Fields
2007-12-10 18:22                               ` Maxim Levitsky
2007-12-10 21:03                             ` Andrew Morton
2007-12-12  2:01                               ` 2.6.24-rc3-git4 NFS crossmnt regression [SOLVED] Maxim Levitsky
2007-12-12  2:15                                 ` Andrew Morton
2007-12-12  2:19                                   ` Trond Myklebust
2007-12-12  2:44                                     ` Andrew Morton
2007-12-12  2:24                                   ` Maxim Levitsky
2007-12-10 19:51                         ` 2.6.24-rc3-git4 NFS crossmnt regression Shane
2007-12-07 22:33       ` Andrew Morton
2007-12-07 22:39         ` Trond Myklebust
2007-12-07 19:54   ` Rafael J. Wysocki

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=1197322514.475db112ac621@imap.vc.cvut.cz \
    --to=vandrove@vc.cvut.cz \
    --cc=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bfields@fieldses.org \
    --cc=den@openvz.org \
    --cc=den@sw.ru \
    --cc=ebiederm@xmission.com \
    --cc=gnome42@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    --cc=trond.myklebust@fys.uio.no \
    --cc=xemul@openvz.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).