Below is a partial patch to provide hooks so that IO clustering can be performed by the file-system. As presented, the same code is used to perform delayed allocation. There has also been a lot of talk about implementing delayed allocation. To be clear, delayed allocation means not immediately allocating disk space on writing the data, say during a sys_write. Instead, allocation of disk blocks to logical blocks is done at the time the logical block needs to be written out. In the end, it looks like taking care of delayed-allocation at writepage() is the best way to go. Following is a patch where buffer-based routines will employ writepage() to do such conversions. In addition to allocating blocks for a single buffer or page, extent based filesystems would allocate blocks for all delayed allocate blocks for the entire extent. These same hooks can be used for clustering (i.e. pushing out contiguous on-disk) as well. Comments, suggestions welcome. ananth. -- -------------------------------------------------------------------------- Rajagopal Ananthanarayanan ("ananth") Member Technical Staff, SGI. --------------------------------------------------------------------------