.\" This manpage has been automatically generated by docbook2man .\" from a DocBook document. This tool can be found at: .\" .\" Please send any bug reports, improvements, comments, patches, .\" etc. to Steve Cheng . .TH "EXT2_FIND_NEAR" "9" "09 October 2005" "" "" .SH NAME ext2_find_near \- find a place for allocation with sufficient locality .SH SYNOPSIS "SYNOPSIS" .sp \fB .sp unsigned long ext2_find_near (struct inode * \fIinode\fB, Indirect * \fIind\fB); \fR .SH "ARGUMENTS" .TP \fB\fIinode\fB\fR owner .TP \fB\fIind\fB\fR descriptor of indirect block. .SH "DESCRIPTION" .PP This function returns the prefered place for block allocation. It is used when heuristic for sequential allocation fails. .SH "RULES ARE" .PP + 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. .PP 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. .PP Caller must make sure that \fIind\fR is valid and will stay that way.