CNFS: round up writev to CNFS_BLOCKSIZE [PATCH]

Russ Allbery rra at
Tue Jun 7 04:56:42 UTC 2005

"Miquel van Smoorenburg" <list-inn-workers at> writes:
> Wim Lewis  <wiml at> wrote:

>> 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.)

> Hmm. Just use st_blksize if CNFS_BLOCKSIZE <= st_blksize <=
> getpagesize(), to round up both the start and the end of the article in
> the CNFS buffer .. that's a good idea, and would not have any influence
> on the on-disk format at all.

INN has to be able to read previously written CNFS buffers.  As long as
any patch preserves that behavior, I'm willing to take any patch that
makes this more efficient.

Padding to CNFS_BLOCKSIZE already does help 25% of the time, although not
100% of the time of course.

We really need to tackle some way of upgrading the disk file formats at
some point.

Russ Allbery (rra at             <>

    Please send questions to the list rather than mailing me directly.
     <> explains why.

More information about the inn-workers mailing list