Received: from eggs.gnu.org ([2001:4830:134:3::10]:42388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e9Wxm-0004Fg-Hi for qemu-devel@nongnu.org; Tue, 31 Oct 2017 09:52:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e9Wxd-00080P-AR for qemu-devel@nongnu.org; Tue, 31 Oct 2017 09:52:18 -0400 From: Alberto Garcia In-Reply-To: <20170929165347.29658-16-mreitz@redhat.com> References: <20170929165347.29658-1-mreitz@redhat.com> <20170929165347.29658-16-mreitz@redhat.com> Date: Tue, 31 Oct 2017 14:52:00 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v6 15/25] block: Use bdrv_dirname() for relative filenames List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, Kevin Wolf , Eric Blake , John Snow On Fri 29 Sep 2017 06:53:37 PM CEST, Max Reitz wrote: > bdrv_get_full_backing_filename_from_filename() breaks down when it comes > to JSON filenames. Using bdrv_dirname() as the basis is better because > since we have BDS, we can descend through the BDS tree to the protocol > layer, which gives us a greater probability of finding a non-JSON name; > also, bdrv_dirname() is more correct as it allows block drivers to > override the generation of that directory name in a protocol-specific > way. > > We still need to keep bdrv_get_full_backing_filename_from_filename(), > though, because it has valid callers which need it during image creation > when no BDS is available yet. > > This makes a test case in qemu-iotest 110, which was supposed to fail, > work. That is actually good, but we need to change the reference output > (and the comment in 110) accordingly. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto