Re: [Nbd] [patch] fix "copy on write" wrong code
- To: Maxim Syrchin <syrchin@...62...>
- Cc: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [patch] fix "copy on write" wrong code
- From: Wouter Verhelst <wouter@...3...>
- Date: Thu, 20 Oct 2005 16:26:08 +0200
- Message-id: <20051020142608.GA13752@...39...>
- In-reply-to: <4356475C.6060308@...62...>
- References: <4356475C.6060308@...62...>
On Wed, Oct 19, 2005 at 05:17:16PM +0400, Maxim Syrchin wrote:
> Hi,
> There are some "bad" places in 2.8.x
> - missed memory allocation for diff file name
Whoops. Thanks for spotting that!
> - wrong place for initialisation of dofmaps
Well -- what's "wrong" is just a matter of opinion here, I'd say. It's
both initialization code...
> - some problem with expread (only blocksize = DIFFPAGESIZE is supported
> with '-c' option)
> diff -u nbd-2.8.0/nbd-server.c nbd_fix_copy_on_write/nbd-server.c
> --- nbd-2.8.0/nbd-server.c 2005-10-19 16:36:04.858192672 +0400
> +++ nbd_fix_copy_on_write/nbd-server.c 2005-10-19 16:38:21.296450904 +0400
> @@ -536,7 +536,7 @@
> } else { /* the block is not there */
> DEBUG2("Page %Lu is not here, we read the original one\n",
> (unsigned long long)mapcnt);
> - return rawexpread(a, buf, rdlen, client);
> + if(rawexpread(a, buf, rdlen, client)) return -1;
> }
> len-=rdlen; a+=rdlen; buf+=rdlen;
> }
Hm. Do you mean that without this change, using nbd-server with -c
doesn't support different blocksizes?
--
The amount of time between slipping on the peel and landing on the
pavement is precisely one bananosecond
Reply to: