[PATCH 0/5] powerpc: add device tree property updates

Milton Miller miltonm at bga.com
Wed Jan 18 16:55:28 EST 2006


On Thu Jan 12 11:34:15 EST 2006, Arnd Bergmann wrote:
> On Wednesday 11 January 2006 22:54, Benjamin Herrenschmidt wrote:
> > Yah, but I do prefer a filesystem
>
> Ok, if you want something to play with, try this one.
> It's my two-hour, 200 line attempt to give you an idea of how
> the most simple implementation could look like.
>
> It's pretty much guaranteed not to work since I don't have any
> powerpc machines around at home, but it's a start.
>
>         Arnd <><

Here's my 30 second review :-)

1) properties (files) should be 0444 not 555
2) directories should be S_IFDIR not S_IFREG (create_dir)
3) this missed one of the requirements,
   namely that it create inodes and dentries on the fly,
   which precludes simple_readdir
4) it doesn't have an api to add or remove files, which is necessary
   because of 3 above.

Ok so what should the inode number be ?

directory inodes should be the phandle .... yeah ..  now to assign all
the others non-conflicting.   Do all the current phandle generators
use either a memory address, offset, or small enum?

5) ref counts ... i would think the node should only be refcounted
   when the directory is open ...  (you were careful to put the root
   but not the child nodes on failed alloc).

   Actually i guess it should be refcounted with the inode lifetime.



Ok, its taking more like 10-20 minutes to type this in, thinking
of more along the way.

milton




More information about the Linuxppc64-dev mailing list