* Reading inode..
@ 2008-09-17 14:07 Rohit Sharma
2008-09-18 21:36 ` Andreas Dilger
0 siblings, 1 reply; 2+ messages in thread
From: Rohit Sharma @ 2008-09-17 14:07 UTC (permalink / raw)
To: ext4; +Cc: Kernelnewbies
I want to read ext2 inode.
Its just like i have a inode no. say 1900..
so from the block group we can read the group descriptor and from there we
can identify the first block no. of the inode table.
So we can read the required inode no.i.e. 1900 from this inode table.
I found that there are 8176 inodes per block group using tune2fs utility,
so if i am interested in reading 8177th inode then i have to move on
to next block groups inode table.
I just want to verify if i am correct on this.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Reading inode..
2008-09-17 14:07 Reading inode Rohit Sharma
@ 2008-09-18 21:36 ` Andreas Dilger
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Dilger @ 2008-09-18 21:36 UTC (permalink / raw)
To: Rohit Sharma; +Cc: ext4, Kernelnewbies
On Sep 17, 2008 19:37 +0530, Rohit Sharma wrote:
> I want to read ext2 inode.
>
> Its just like i have a inode no. say 1900..
> so from the block group we can read the group descriptor and from there we
> can identify the first block no. of the inode table.
> So we can read the required inode no.i.e. 1900 from this inode table.
> I found that there are 8176 inodes per block group using tune2fs utility,
That is true for your filesystem, it might be different for each ext*
filesystems, depending on many parameters.
> so if i am interested in reading 8177th inode then i have to move on
> to next block groups inode table.
Right, for this particular filesystem.
Note also that there is libext2fs for performing operations like this on
the filesystem in userspace.
If you are reading the inode from within the kernel you can just use
ext2_read_inode().
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-18 21:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-17 14:07 Reading inode Rohit Sharma
2008-09-18 21:36 ` Andreas Dilger
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).