Re: [BK-PATCH 1/3] Introduce fs/inode.c::ilookup().

From: Daniel Phillips (phillips@arcor.de)
Date: Mon Sep 09 2002 - 11:04:38 EST


On Monday 09 September 2002 10:51, Anton Altaparmakov wrote:
> At 17:25 08/09/02, Daniel Phillips wrote:
> >On Saturday 07 September 2002 16:27, Anton Altaparmakov wrote:
> > > Linus,
> > >
> > > This is the first of three patches implementing ilookup(), a function
> > > to search the inode cache for an inode and if not found just return NULL.
> > >
> > > All response about ilookup() / ilookup5() was positive and several
> > > file systems would like to have such a function available.
> >
> >Well, one person thought it should be called ifind.
>
> Yes, you did. But that is too confusing with find_inode and friends IMHO
> and lookups are often termed _lookup and not _find, e.g.
> radix_tree_lookup(), simple_lookup(), d_lookup(), path_lookup(),
> cached_lookup()...
>
> Whereas there is not a single function in fs/ or mm/ ending in _find...
> They are all called find_blah and find_inode already exists... Having both
> find_inode and inode_find aka ifind seems weird, at least to me...

Why is ifind->find_inode weirder than iget->__iget?

> There was another suggestion on #kernel and that was to do:
>
> s/ilookup/ilookup_fast/
> s/ilookup5/ilookup/
>
> But if we do that we might as well carry on and also do:
>
> s/iget_locked/iget_locked_fast/
> s/iget5_locked/iget_locked/
>
> And another one was:
>
> s/ilookup5/ilookup_hash/
>
> and by extension / for consistency one could add:
>
> s/iget5_locked/iget_hash_locked/
> s/find_inode/find_inode_hash/
> s/find_inode_fast/find_inode/
> s/get_new_inode_fast/get_new_inode/
> s/get_new_inode/get_new_inode_hash/
>
> How about those?

Unless we're planning to break with tradition completely it should be
isomething, where something E {find, lookup, search}.

On another front, hash desperately wants to be ihash.

-- 
Daniel
-
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/



This archive was generated by hypermail 2b29 : Sun Sep 15 2002 - 22:00:17 EST