linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Jeff Layton <jlayton@redhat.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [RFC][PATCH] ensure i_ino uniqueness in filesystems without permanent inode numbers (via idr)
Date: Thu, 16 Nov 2006 14:06:22 +0000	[thread overview]
Message-ID: <20061116140621.GG29920@ftp.linux.org.uk> (raw)
In-Reply-To: <1163608958.7571.8.camel@tleilax.poochiereds.net>

On Wed, Nov 15, 2006 at 11:42:38AM -0500, Jeff Layton wrote:
> +{
> +	int rv;
> +
> +	rv = idr_pre_get(&inode->i_sb->s_inode_ids, GFP_KERNEL);
> +	if (! rv)
> +		return -ENOMEM;
> +
> +	lock_super(inode->i_sb);

?!#!@#!???

Please, use something saner.  Use of lock_super() for anything generic
is wrong; using it for something that'd better be fast is even dumber...

> @@ -1025,6 +1055,7 @@ void generic_delete_inode(struct inode *
>  	spin_lock(&inode_lock);
>  	hlist_del_init(&inode->i_hash);
>  	spin_unlock(&inode_lock);
> +	iunique_unregister(inode);

Unconditional?  Hitting every fs out there?  With that kind of locking?

>  	wake_up_inode(inode);
>  	BUG_ON(inode->i_state != I_CLEAR);
>  	destroy_inode(inode);
> @@ -1057,6 +1088,7 @@ static void generic_forget_inode(struct 
>  	inode->i_state |= I_FREEING;
>  	inodes_stat.nr_inodes--;
>  	spin_unlock(&inode_lock);
> +	iunique_unregister(inode);

Ditto.

>  	if (inode->i_data.nrpages)
>  		truncate_inode_pages(&inode->i_data, 0);
>  	clear_inode(inode);
> diff --git a/fs/pipe.c b/fs/pipe.c
> index b1626f2..d74ae65 100644
> --- a/fs/pipe.c
> +++ b/fs/pipe.c
> @@ -845,6 +845,9 @@ static struct inode * get_pipe_inode(voi
>  	if (!inode)
>  		goto fail_inode;
>  
> +	if (iunique_register(inode, 0))
> +		goto fail_iput;
> +

Humm...  I wonder what the overhead of that is going to be.  There
easily can be shitloads of pipes on the box, with all sorts of
lifetimes.  And we'd better be fast on that codepath...

  parent reply	other threads:[~2006-11-16 14:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-14 20:22 [RFC][PATCH] ensure i_ino uniqueness in filesystems without permanent inode numbers (via idr) Jeff Layton
2006-11-14 20:26 ` Al Viro
2006-11-15 16:42   ` Jeff Layton
2006-11-15 16:44     ` Jeff Layton
2006-11-16 14:06     ` Al Viro [this message]
2006-11-16 14:34       ` Jeff Layton
2006-11-15 17:27 ` Matthew Wilcox
2006-11-15 17:56   ` Jörn Engel
2006-11-15 20:36     ` Jeff Layton
  -- strict thread matches above, loose matches on Subject: below --
2006-12-01 14:48 Jeff Layton
2006-12-01 16:52 ` Randy Dunlap
2006-12-01 17:21   ` Jeff Layton
2006-12-01 17:42     ` Randy Dunlap
2006-12-02  5:30     ` Brad Boyer
2006-12-03  2:56       ` Jeff Layton
2006-12-02 12:58         ` Brad Boyer
2006-12-03 11:52           ` Al Boldi
2006-12-03 12:49           ` Jeff Layton

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=20061116140621.GG29920@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@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).