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

Re: [Nbd] [patch] fix "copy on write" wrong code



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: