* i_block field
@ 2012-03-12 13:21 Ganesh Patil
2012-04-02 12:29 ` Pritam Bankar
0 siblings, 1 reply; 3+ messages in thread
From: Ganesh Patil @ 2012-03-12 13:21 UTC (permalink / raw)
To: kernelnewbies
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120312/e8453cfc/attachment.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* i_block field
2012-03-12 13:21 i_block field Ganesh Patil
@ 2012-04-02 12:29 ` Pritam Bankar
2012-04-02 16:20 ` Ganesh Patil
0 siblings, 1 reply; 3+ messages in thread
From: Pritam Bankar @ 2012-04-02 12:29 UTC (permalink / raw)
To: kernelnewbies
May I know what is e4_inode ?
Thanks,
Pritam
On Mon, Mar 12, 2012 at 6:51 PM, Ganesh Patil <patil.ganesh170@gmail.com>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 at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
--
Pritam Bankar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120402/2da25eb7/attachment.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* i_block field
2012-04-02 12:29 ` Pritam Bankar
@ 2012-04-02 16:20 ` Ganesh Patil
0 siblings, 0 replies; 3+ messages in thread
From: Ganesh Patil @ 2012-04-02 16:20 UTC (permalink / raw)
To: kernelnewbies
On Mon, Apr 2, 2012 at 5:59 PM, Pritam Bankar <pritambankar1988@gmail.com>wrote:
> May I know what is e4_inode ?
>
> Thanks,
> Pritam
>
> On Mon, Mar 12, 2012 at 6:51 PM, Ganesh Patil <patil.ganesh170@gmail.com>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 at kernelnewbies.org
>> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120402/5482e1ce/attachment.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-04-02 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-12 13:21 i_block field Ganesh Patil
2012-04-02 12:29 ` Pritam Bankar
2012-04-02 16:20 ` Ganesh Patil
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).