linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ext2_block_alloc_info
@ 2008-12-20 15:43 Rohit Sharma
  2008-12-20 19:40 ` ext2_block_alloc_info Sandeep K Sinha
  2008-12-21  1:25 ` ext2_block_alloc_info Peter Teoh
  0 siblings, 2 replies; 13+ messages in thread
From: Rohit Sharma @ 2008-12-20 15:43 UTC (permalink / raw)
  To: Kernelnewbies, ext4

A little confusion.

Just refer this structure in linux/ext2_fs_sb.h

struct ext2_block_alloc_info {
  46        /* information about reservation window */
  47        struct ext2_reserve_window_node rsv_window_node;
  48        /*
  49         * was i_next_alloc_block in ext2_inode_info
  50         * is the logical (file-relative) number of the
  51         * most-recently-allocated block in this file.
  52         * We use this for detecting linearly ascending allocation requests.
  53         */
  54        __u32                   last_alloc_logical_block;
  55        /*
  56         * Was i_next_alloc_goal in ext2_inode_info
  57         * is the *physical* companion to i_next_alloc_block.
  58         * it the the physical block number of the block which was
most-recentl
  59         * allocated to this file.  This give us the goal (target)
for the next
  60         * allocation when we detect linearly ascending requests.
  61         */
  62        ext2_fsblk_t            last_alloc_physical_block;
  63};


this information is maintained by ext2 for every inode.

here  last_alloc_logical_block is for every inode or its for filesystem.

I mean if we are allocating blocks for inode
it can be block no.  0 to n logically
and physically like 23 24 25 34 36 40 41 42

i mean to say

is it like

inode1 has logical blocks 1 2 3 , physical 22 23 24
inode2 has logical blocks 4 5 6 , physical 34 35 50

OR

inode1 has logical blocks 0 1 2 , physical 22 23 24
inode2 has logical blocks 0 1 2 , physical 34 35 50

??

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-12-24 16:26 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-20 15:43 ext2_block_alloc_info Rohit Sharma
2008-12-20 19:40 ` ext2_block_alloc_info Sandeep K Sinha
2008-12-20 19:44   ` ext2_block_alloc_info Rohit Sharma
2008-12-21  1:25 ` ext2_block_alloc_info Peter Teoh
2008-12-23  2:56   ` ext2_block_alloc_info Mike Snitzer
2008-12-23  4:27     ` ext2_block_alloc_info Peter Teoh
2008-12-23  4:29     ` ext2_block_alloc_info Peter Teoh
2008-12-23  4:37       ` ext2_block_alloc_info Sandeep K Sinha
2008-12-23  7:06         ` ext2_block_alloc_info Peter Teoh
2008-12-23  8:05         ` ext2_block_alloc_info Andreas Dilger
2008-12-24  6:45           ` ext2_block_alloc_info Sandeep K Sinha
2008-12-23  5:00       ` ext2_block_alloc_info Manish Katiyar
2008-12-24 16:23       ` ext2_block_alloc_info Eric Sandeen

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).