Re: Inode question
From: Paulo Marques
Date: Thu Jul 22 2004 - 09:24:37 EST
On Wed, 2004-07-21 at 23:57, sankarshana rao wrote:
> Guys,
> Thx for the inputs...I got it with path_lookup....
>
> Can I pass the inode pointer back to the user space???
To get an inode number from user space you can simply use the "stat" or
"fstat" functions. You don't need to create your own module.
> I have a scenario in which I have to create multiple
> folders on the harddisk. The number of folders can be
> in hundreds. Instead of parsing the path name
> everytime I need to create a folder (that's what
> sys_mkdir does??? ), I was thinking if I have the
> inode* of the parent folder, I can avoid this parsing
> and directly create a subfolder under the parent
> folder...
Is this really a problem? The dentry cache should make this quite fast,
leaving the bottleneck to the actual write on disk of the result.
I tried a small program (if it can be called a program) to create a
thousand directories and it takes less than 100 ms on my machine.
Best regards,
--
Paulo Marques - www.grupopie.com
"In a world without walls and fences who needs windows and gates?"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/