summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2002-12-21 01:07:39 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-12-21 01:07:39 -0800
commit61432dbc48098e0fa2bc33f5aa02357c3f2025ff (patch)
tree0273d446eccc2b2942f9fdcc76faa5d0c92c4812 /include/linux
parente386771cbbc2a90b46df2ace02214f94cc23cb50 (diff)
[PATCH] ext2/3 commentary and cleanup
- Add some (much-needed) commentary to the ext2/ext3 block allocator state fields. - Remove the SEARCH_FROM_ZERO debug code. I wrote that to trigger some race and it hasn't been used in a year.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/ext3_fs_i.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h
index ec11e1ab01c5..02021676dd74 100644
--- a/include/linux/ext3_fs_i.h
+++ b/include/linux/ext3_fs_i.h
@@ -32,9 +32,30 @@ struct ext3_inode_info {
__u32 i_file_acl;
__u32 i_dir_acl;
__u32 i_dtime;
+
+ /*
+ * i_block_group is the number of the block group which contains
+ * this file's inode. Constant across the lifetime of the inode,
+ * it is ued for making block allocation decisions - we try to
+ * place a file's data blocks near its inode block, and new inodes
+ * near to their parent directory's inode.
+ */
__u32 i_block_group;
__u32 i_state; /* Dynamic state flags for ext3 */
+
+ /*
+ * i_next_alloc_block is the logical (file-relative) number of the
+ * most-recently-allocated block in this file. Yes, it is misnamed.
+ * We use this for detecting linearly ascending allocation requests.
+ */
__u32 i_next_alloc_block;
+
+ /*
+ * i_next_alloc_goal is the *physical* companion to i_next_alloc_block.
+ * it the the physical block number of the block which was most-recently
+ * allocated to this file. This give us the goal (target) for the next
+ * allocation when we detect linearly ascending requests.
+ */
__u32 i_next_alloc_goal;
#ifdef EXT3_PREALLOCATE
__u32 i_prealloc_block;