lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 16 Mar 2012 10:18:10 +0100
From:	Jan Kara <jack@...e.cz>
To:	Akshay Nehe <akshaynehe785@...il.com>
Cc:	linux-ext4 <linux-ext4@...r.kernel.org>
Subject: Re: Required help for understanding ext4 block allocation

  Hello,

On Thu 15-03-12 18:48:56, Akshay Nehe wrote:
> I am trying to understand the block allocation in ext4 file sytem, I
> have gone through all basic theory and browsing code to do it.
> 
> I am writing a module in which i got ext4 on disk inode, now according
> to theory first 12 bytes of i_block points to ext4_extent_header, so
> can i use this array of i_block[EXT4_N_BLOCKS].
> 
> Means how to fill objects of  struct ext4_extent_header (using first
> 12 byte of i_block) and  struct ext4_extent (using reminder bytes of
> i_block).
  struct ext4_extent_header is just directly stored in the space occupied
by i_block[EXT4_N_BLOCKS]. So for example ext_inode_hdr() does:
  (struct ext4_extent_header *)EXT4_I(inode)->i_data
(where i_data is just one-to-one copy of i_blocks from on disk inode).

And it's the same with struct ext4_extent. See for example macro
EXT_FIRST_EXTENT.

								Honza

-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ