From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4Vqs-0005Jw-V8 for qemu-devel@nongnu.org; Wed, 31 Jul 2013 08:50:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V4Vqo-0006ze-8v for qemu-devel@nongnu.org; Wed, 31 Jul 2013 08:50:02 -0400 Received: from mx4-phx2.redhat.com ([209.132.183.25]:40859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V4Vqo-0006zR-07 for qemu-devel@nongnu.org; Wed, 31 Jul 2013 08:49:58 -0400 Date: Wed, 31 Jul 2013 08:49:54 -0400 (EDT) From: Paolo Bonzini Message-ID: <2124618544.7479949.1375274994260.JavaMail.root@redhat.com> In-Reply-To: <20130731091227.GE3090@dhcp-200-207.str.redhat.com> References: <1374762197-7261-1-git-send-email-pbonzini@redhat.com> <1374762197-7261-19-git-send-email-pbonzini@redhat.com> <20130731091227.GE3090@dhcp-200-207.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 18/19] block: add default get_block_status implementation for protocols List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: pl@kamp.de, qemu-devel@nongnu.org, stefanha@redhat.com ----- Original Message ----- > From: "Kevin Wolf" > To: "Paolo Bonzini" > Cc: qemu-devel@nongnu.org, stefanha@redhat.com, eblake@redhat.com, pl@kamp.de > Sent: Wednesday, July 31, 2013 11:12:27 AM > Subject: Re: [PATCH v3 18/19] block: add default get_block_status implementation for protocols > > Am 25.07.2013 um 16:23 hat Paolo Bonzini geschrieben: > > Protocols return raw data, so you can assume the offsets to pass > > through unchanged. > > > > Reviewed-by: Eric Blake > > Signed-off-by: Paolo Bonzini > > Not really objecting, but is this useful? > > In formats, BDRV_BLOCK_OFFSET_VALID means that the given offset is valid > for bs->file, which is something that protocols simply don't have. You > can do it like you do here, but actually this information is redundant. > > Do you make use of it for anything? It is used by format=raw. I could do it in raw.c, but some protocols are opened directly without the "raw" veneer on top. Paolo