lkml.org 
[lkml]   [2010]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 19/19] fs: do not assign default i_ino in new_inode
From
Date
Le samedi 16 octobre 2010 à 12:35 -0400, Christoph Hellwig a écrit :

> What's the point, really? Assigning i_ino in new_inode always has been
> an utterly stupid idea to start with. I fixed the few filesystem that
> need it to do it explicitly. There's nothing unsafe about it - checking
> callers of new_inode for manual i_ino assignment was trivial.
>
> Conditional code like the one you suggested is simply evil - it
> complicates things instead of simplifying them.

This is what we call code factorization. I wont call it evil.

If we want to change get_next_ino(void) implementation to
get_next_ino(struct inode *), or even get_next_inode(struct inode
*inode, struct super_block *sb)
then we must go through all fs after your patch to add the new
parameter.

I proposed an implementation on get_next_ino() on 32bit arches, with no
per_cpu and shared counter, assuming we know the inode pointer. With
your patch, it become very difficult to implement such an idea.



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

\
 
 \ /
  Last update: 2010-10-18 11:15    [W:0.066 / U:9.068 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site