EXT2_FIND_NEAR

Section: (9)
Updated: 09 October 2005
Index Return to Main Contents

 

NAME

ext2_find_near - find a place for allocation with sufficient locality  

SYNOPSIS

"SYNOPSIS"

unsigned long ext2_find_near (struct inode * inode, Indirect * ind);  

ARGUMENTS

inode
owner
ind
descriptor of indirect block.
 

DESCRIPTION

This function returns the prefered place for block allocation. It is used when heuristic for sequential allocation fails.  

RULES ARE

+ if there is a block to the left of our position - allocate near it. + if pointer will live in indirect block - allocate near that block. + if pointer will live in inode - allocate in the same cylinder group.

In the latter case we colour the starting block by the callers PID to prevent it from clashing with concurrent allocations for a different inode in the same block group. The PID is used here so that functionally related files will be close-by on-disk.

Caller must make sure that ind is valid and will stay that way.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION
RULES ARE

This document was created by man2html, using the manual pages.
Time: 00:02:08 GMT, October 09, 2005