Re: [Nbd] Slight increase to BUFSIZE
- To: Kurt Fitzner <kfitzner@...75...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] Slight increase to BUFSIZE
- From: Wouter Verhelst <w@...112...>
- Date: Tue, 20 Mar 2007 10:19:18 +0100
- Message-id: <20070320091918.GC10614@...39...>
- In-reply-to: <45FDB454.6030804@...75...>
- References: <45FDB454.6030804@...75...>
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: