CNFS: round up writev to CNFS_BLOCKSIZE [PATCH]

Wim Lewis wiml at omnigroup.com
Mon May 9 16:29:55 UTC 2005


On 8 May, 2005, at 4:09 AM, Miquel van Smoorenburg wrote:
> Right now, CNFS blocks are written starting on a CNFS_BLOCKSIZE
> boundary, but not ending on one.
>
> That means that even if CNFS_BLOCKSIZE is a multiple of the
> filesystem blocksize, the OS still needs to read the last block
> from disk in order to complete the write (remember - partial
> block writes need a read from disk first).
[...]
> This will only make a real difference on filesystems that have
> a blocksize of which CNFS_BLOCKSIZE (512 by default) is a multiple.

Would it be better to fstat the CNFS file when it is opened and then, 
instead of rounding to CNFS_BLOCKSIZE, round to st_blksize? (Or to the 
lesser of CNFS_BLOCKSIZE and st_blksize, really.)



More information about the inn-workers mailing list