[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] Slight increase to BUFSIZE



On Sun, Mar 18, 2007 at 03:51:16PM -0600, Kurt Fitzner wrote:
> When the buffer overwrite bug was fixed, the fix was added to check to
> see if the block + header was larger than the buffer, instead of making
> the buffer to include the header.  The problem is, this has subsequently
> precluded requests from being the full 1024k in size.
> 
> I would like to request the buffer size be increased to 1024k +
> sizeof(struct nbd_reply).  The 20 byte increase is negligible, but will
> be a significant help in my case, where my transaction sizes need to be
> a power of two.

Yeah, make sense. Done.

> Also, I'd suggest the buffer not be drawn from the stack.  The default
> one meg BUFSIZE is already a significant percentage of the entire stack
> size in many kernels.  If someone naively increases it further without
> realizing it isn't malloced, it could cause problems.

Indeed. Also done; both in r248.

-- 
<Lo-lan-do> Home is where you have to wash the dishes.
  -- #debian-devel, Freenode, 2004-09-22



Reply to: