On Mon, Apr 2, 2012 at 5:59 PM, Pritam Bankar <pritambankar1988@xxxxxxxxx> wrote:
May I know what is e4_inode ?Thanks,PritamOn Mon, Mar 12, 2012 at 6:51 PM, Ganesh Patil <patil.ganesh170@xxxxxxxxx> wrote:
_______________________________________________Hello,
I have printed the i_blocks[EXT4_N_BLOCKS] filed from ext4_inode structure. of my file (a.txt);
code:
ret= ext4_get_inode_loc(d_inode1, &iloc);
e4_inode= ext4_raw_inode(&iloc);
for(i=0;i<5;i++)
{
printk(KERN_INFO "%d",e4_inode->i_block[i]);
}
I got the following result.:
127754
4
0
0
1
8705
what is the 127754 (Address of extent or data block)?
what is 8705 &1 ?
--
Regards,
Ganesh Patil.
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
--
Pritam Bankar
Above e4_inode field is the pointer of type struct ext4_inode i.e on disk structure of ext4 inode. i.e
Struct ext4_inode *e4_inode=ext4_raw_inode(&iloc);
Sir, but for above question I got answer. because i copied first 12 byte of i_block[..] to ext4_header structure and next 12 bytes in to ext4_extent.so from that I got actual physical block numbers.
struct ext4_extent_header *eeh = (struct ext4_extent_header*)EXT4_I(d_inode1)->i_data;
struct ext4_extent *eex=eex = EXT_FIRST_EXTENT(eeh);
--
Regards,
Ganesh Patil.
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies