Received: from eggs.gnu.org ([209.51.188.92]:54339) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gjhbr-00072f-8O for qemu-devel@nongnu.org; Wed, 16 Jan 2019 04:35:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gjhbq-0002SZ-H9 for qemu-devel@nongnu.org; Wed, 16 Jan 2019 04:35:43 -0500 From: Alberto Garcia In-Reply-To: <9b9b651d-729e-d72f-5335-b9c8121135d3@virtuozzo.com> References: <20190114111744.113188-1-anton.nefedov@virtuozzo.com> <20190114111744.113188-10-anton.nefedov@virtuozzo.com> <9b9b651d-729e-d72f-5335-b9c8121135d3@virtuozzo.com> Date: Wed, 16 Jan 2019 10:35:38 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v12 09/10] qcow2: skip writing zero buffers to empty COW areas List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anton Nefedov , "qemu-devel@nongnu.org" Cc: "qemu-block@nongnu.org" , "kwolf@redhat.com" , "mreitz@redhat.com" , "eblake@redhat.com" , Denis Lunev , Vladimir Sementsov-Ogievskiy On Wed 16 Jan 2019 10:32:33 AM CET, Anton Nefedov wrote: >>> + ret = handle_alloc_space(bs, l2meta); >> >> I insist that it would be nice to have a short comment explaining >> what this does. > > Right sorry forgot your comment. > I'd go with: > > + /* Try to efficiently initialize the physical space with zeroes */ > ret = handle_alloc_space(bs, l2meta); > if (ret < 0) { > qemu_co_mutex_lock(&s->lock); That looks good, thanks! Berto