Received: from eggs.gnu.org ([2001:4830:134:3::10]:41291) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSKXP-0001oD-H4 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 05:54:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSKXO-0000NM-0m for qemu-devel@nongnu.org; Tue, 04 Jul 2017 05:54:31 -0400 Date: Tue, 4 Jul 2017 11:54:18 +0200 From: Kevin Wolf Message-ID: <20170704095418.GB4253@noname.str.redhat.com> References: <20170704084059.6278-1-el13635@mail.ntua.gr> <20170704084059.6278-3-el13635@mail.ntua.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170704084059.6278-3-el13635@mail.ntua.gr> Subject: Re: [Qemu-devel] [PATCH v3 2/4] block: Use defaults of bdrv_* callbacks in raw List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Manos Pitsidianakis Cc: qemu-devel , Max Reitz , Stefan Hajnoczi , Alberto Garcia , Eric Blake , qemu-block Am 04.07.2017 um 10:40 hat Manos Pitsidianakis geschrieben: > Now that passing the call to bs->file is the default for some bdrv_* > callbacks, remove the duplicate implementations in block/raw-format.c > > Reviewed-by: Eric Blake > Signed-off-by: Manos Pitsidianakis If you change patch 1 as suggested there, most of these functions will have to stay. The exception is .bdrv_has_zero_init, for which I suggested an .is_filter check. However, raw isn't declared a filter currently. If we want to declare it a filter, the definition I proposed in the other mail doesn't work because raw can apply an offset - this why it needs its own function for probing geometry, so with that changed definition checking .is_filter might not be enough any more for all of the functions in patch 1. Maybe it turns out in the end that raw just is special enough that having its own functions is okay. Kevin