From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK7p3-0001nv-Vn for qemu-devel@nongnu.org; Wed, 20 Aug 2014 11:29:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XK7ox-0008TH-Ob for qemu-devel@nongnu.org; Wed, 20 Aug 2014 11:29:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XK7ox-0008Sw-Ha for qemu-devel@nongnu.org; Wed, 20 Aug 2014 11:29:07 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7KFT62R008939 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 20 Aug 2014 11:29:06 -0400 Date: Wed, 20 Aug 2014 17:29:04 +0200 From: Kevin Wolf Message-ID: <20140820152904.GJ6122@noname.redhat.com> References: <1405707901-8253-1-git-send-email-mreitz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1405707901-8253-1-git-send-email-mreitz@redhat.com> Subject: Re: [Qemu-devel] [PATCH 0/6] block: Let drivers reconstruct the filename List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi Am 18.07.2014 um 20:24 hat Max Reitz geschrieben: > We may sometimes want a filename for BDSs which do not have one because > they weren't opened using a simple filename (but rather just through > options, for example). > > Some block drivers are always capable of reconstructing a valid filename > (e.g. NBD), even if the BDS has been opened using the options QDict > only. For others (e.g. Quorum) this is impossible. To accommodate this > case, the function which reconstructs ("refreshes") the filename for a > BDS also generates an options QDict (which should always work). If some > layer cannot generate a plain filename (e.g. a Quorum instance), we can > still generate a QDict which contains all options necessary for opening > the block device in (basically) the same state. > > If a filename can be generated, the one stored in the BDS is > overwritten. Otherwise, the QDict is converted to JSON, prefixed with > "json:" and then used as the filename (making use of the JSON > pseudo-protocol). > > > Block drivers which probably need to implement bdrv_refresh_filename() > besides blkdebug, blkverify, NBD and Quorum but which this series does > not cover, are the following: curl, ssh and vvfat. Thanks, applied all to the block branch. I don't think we're done yet. This series leads to some strange looking things both in the source and in the output. I merged it anyway because I think it does provide some value and we can fix the problems incrementally. Kevin