Russell Cattelan writes:
=> Daniel Moore wrote:
=>
=> > Russell Cattelan writes:
=> >
=> > => Yes I would guess so.
=> > => Setting the length to the count is not what you want to do.
=> > => The buffer_length must remain set to whatever size the page_buf was
=> > => set up with.
=> >
=> > I don't think I'm doing that.
=>
=> #define XFS_BUF_SET_SIZE(bp, cnt) \
=> ! ((bp)->pb_count_desired = (bp)->pb_buffer_length =
=> cnt)
Well yes, but that's actually setting the count to the length... ie the
length was already set, that just resets the count at the same time.
=> I think we need to keep the length and the count uniq... if we
=> can set them to one another then we can get rid of one?!
No - the way I figure it, most of the time they're the same because
most of the code allocates a buffer of size X, then reads X bytes
and/or reads X bytes and never changes the size.
The log code however frequently allocates buffers of size X, then
wants to read or write < X bytes into the buffer.
I'm not sure what the semantics of the two things are in the current
pagebuf code are, but my patch was essentially changing them to:
pb_buffer_length == actual length of buffer
pb_count_desired == bytes to read or write in buffer
which equals pb_buffer_length _most_ of the time
but not when overridden.
(pb_count_desired is a strange name (whatever it means)...)
-----------------------------------------------------
Daniel Moore dxm@xxxxxxx
R&D Software Engineer Phone: +61-3-98348209
SGI Performance Tools Group Fax: +61-3-98132378
-----------------------------------------------------
|