CNFS: round up writev to CNFS_BLOCKSIZE [PATCH]

"Miquel van Smoorenburg" list-inn-workers at news.cistron.nl
Mon May 9 18:23:26 UTC 2005


In article <fdbc9c565ab2b305c5d41161ea14d7f7 at omnigroup.com>,
Wim Lewis  <wiml at omnigroup.com> wrote:
>
>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.)

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.

Mike.

-- 
The From: and Reply-To: addresses are internal news2mail gateway addresses.
Reply to the list or to "Miquel van Smoorenburg" <miquels at cistron.nl>


More information about the inn-workers mailing list