All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, Ian Kent <raven@themaw.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Miklos Szeredi <mszeredi@suse.cz>
Subject: Re: [patch 2/6] fs: no games with DCACHE_UNHASHED
Date: Thu, 15 Oct 2009 11:13:45 +0200	[thread overview]
Message-ID: <4AD6E7C9.5080001@gmail.com> (raw)
In-Reply-To: <20091015082903.GD4262@wotan.suse.de>

Nick Piggin a écrit :

> So what if we were to do this first? Are there any other reasons I've
> missed? (btw. this changes the format the link if that is a problem.
> Probably if we're going to do this change, we should change things like
> [timerfd] to just timerfd while we're there to improve consistency
> further.
> --
> Pipe and socket pseudo filesystems report their file descriptor link
> paths as pipe:[ino] and socket:[ino]. anon_inodefs allows subsystems
> to specify a name, but it does not report an associated inode number.
> 
> Implement this with anon_inodefs_dname in the same way pipefs and sockfs
> are.
> 
> ---
>  fs/anon_inodes.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> Index: linux-2.6/fs/anon_inodes.c
> ===================================================================
> --- linux-2.6.orig/fs/anon_inodes.c
> +++ linux-2.6/fs/anon_inodes.c
> @@ -45,6 +45,15 @@ static int anon_inodefs_delete_dentry(st
>  	return 1;
>  }
>  
> +/*
> + * anon_inodefs_dname() is called from d_path().
> + */
> +static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen)
> +{
> +	return dynamic_dname(dentry, buffer, buflen, "%s:[%lu]",
> +				dentry->d_name.name, dentry->d_inode->i_ino);
> +}
> +
>  static struct file_system_type anon_inode_fs_type = {
>  	.name		= "anon_inodefs",
>  	.get_sb		= anon_inodefs_get_sb,
> @@ -52,6 +61,7 @@ static struct file_system_type anon_inod
>  };
>  static const struct dentry_operations anon_inodefs_dentry_operations = {
>  	.d_delete	= anon_inodefs_delete_dentry,
> +	.d_dname	= anon_inodefs_dname,
>  };
>  
>  /*

Yes, that would be fine, thanks Nick.

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>


WARNING: multiple messages have this Message-ID (diff)
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, Ian Kent <raven@themaw.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org, Miklos Szeredi <mszeredi@suse.cz>
Subject: Re: [patch 2/6] fs: no games with DCACHE_UNHASHED
Date: Thu, 15 Oct 2009 11:13:45 +0200	[thread overview]
Message-ID: <4AD6E7C9.5080001@gmail.com> (raw)
In-Reply-To: <20091015082903.GD4262@wotan.suse.de>

Nick Piggin a écrit :

> So what if we were to do this first? Are there any other reasons I've
> missed? (btw. this changes the format the link if that is a problem.
> Probably if we're going to do this change, we should change things like
> [timerfd] to just timerfd while we're there to improve consistency
> further.
> --
> Pipe and socket pseudo filesystems report their file descriptor link
> paths as pipe:[ino] and socket:[ino]. anon_inodefs allows subsystems
> to specify a name, but it does not report an associated inode number.
> 
> Implement this with anon_inodefs_dname in the same way pipefs and sockfs
> are.
> 
> ---
>  fs/anon_inodes.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> Index: linux-2.6/fs/anon_inodes.c
> ===================================================================
> --- linux-2.6.orig/fs/anon_inodes.c
> +++ linux-2.6/fs/anon_inodes.c
> @@ -45,6 +45,15 @@ static int anon_inodefs_delete_dentry(st
>  	return 1;
>  }
>  
> +/*
> + * anon_inodefs_dname() is called from d_path().
> + */
> +static char *anon_inodefs_dname(struct dentry *dentry, char *buffer, int buflen)
> +{
> +	return dynamic_dname(dentry, buffer, buflen, "%s:[%lu]",
> +				dentry->d_name.name, dentry->d_inode->i_ino);
> +}
> +
>  static struct file_system_type anon_inode_fs_type = {
>  	.name		= "anon_inodefs",
>  	.get_sb		= anon_inodefs_get_sb,
> @@ -52,6 +61,7 @@ static struct file_system_type anon_inod
>  };
>  static const struct dentry_operations anon_inodefs_dentry_operations = {
>  	.d_delete	= anon_inodefs_delete_dentry,
> +	.d_dname	= anon_inodefs_dname,
>  };
>  
>  /*

Yes, that would be fine, thanks Nick.

Acked-by: Eric Dumazet <eric.dumazet@gmail.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-10-15  9:14 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-15  4:40 [patch 0/6] vfsmount scaling and other bits npiggin
2009-10-15  4:40 ` [patch 1/6] fs: invalidate sb->s_bdev on remount,ro npiggin
2009-10-15  4:40 ` [patch 2/6] fs: no games with DCACHE_UNHASHED npiggin
2009-10-15  6:31   ` David Miller
2009-10-15  7:44   ` Eric Dumazet
2009-10-15  7:44     ` Eric Dumazet
2009-10-15  8:13     ` Nick Piggin
2009-10-15  8:13       ` Nick Piggin
2009-10-15  8:29       ` Nick Piggin
2009-10-15  9:13         ` Eric Dumazet [this message]
2009-10-15  9:13           ` Eric Dumazet
2009-10-15 13:20         ` Matthew Wilcox
2009-10-15 14:41           ` Nick Piggin
2009-10-15  4:40 ` [patch 3/6] fs: dcache remove d_mounted npiggin
2009-10-15 10:37   ` Ian Kent
2009-10-15  4:40 ` [patch 4/6] brlock: introduce special brlocks npiggin
2009-10-15  6:58   ` [rfc][patch 4a/6] brlock: "fast" brlocks Nick Piggin
2009-10-15 11:05     ` Peter Zijlstra
2009-10-15 11:26       ` Nick Piggin
2009-10-19  5:25   ` [patch 4/6] brlock: introduce special brlocks Andrew Morton
2009-10-19  9:49     ` Nick Piggin
2009-10-19 12:24       ` Andrew Morton
2009-10-19 12:48         ` Nick Piggin
2009-10-15  4:40 ` [patch 5/6] fs: brlock vfsmount_lock npiggin
2009-10-15  4:40 ` [patch 6/6] fs: scale mntget/mntput npiggin

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=4AD6E7C9.5080001@gmail.com \
    --to=eric.dumazet@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mszeredi@suse.cz \
    --cc=npiggin@suse.de \
    --cc=raven@themaw.net \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.