From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfqHU-0000gk-NL for qemu-devel@nongnu.org; Fri, 24 May 2013 07:35:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UfqHO-0007uj-Mf for qemu-devel@nongnu.org; Fri, 24 May 2013 07:35:32 -0400 Received: from mail-wi0-x233.google.com ([2a00:1450:400c:c05::233]:35830) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UfqHO-0007uZ-Fx for qemu-devel@nongnu.org; Fri, 24 May 2013 07:35:26 -0400 Received: by mail-wi0-f179.google.com with SMTP id hq7so2660517wib.12 for ; Fri, 24 May 2013 04:35:25 -0700 (PDT) Date: Fri, 24 May 2013 13:35:22 +0200 From: Stefan Hajnoczi Message-ID: <20130524113522.GA23160@stefanha-thinkpad.redhat.com> References: <1369298836-17416-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1369298836-17416-3-git-send-email-xiawenc@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1369298836-17416-3-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH V2 2/5] block: move snapshot code in block.c to block/snapshot.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: kwolf@redhat.com, phrdina@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, pbonzini@redhat.com, lcapitulino@redhat.com On Thu, May 23, 2013 at 04:47:13PM +0800, Wenchao Xia wrote: > -int bdrv_is_snapshot(BlockDriverState *bs) > -{ > - return !!(bs->open_flags & BDRV_O_SNAPSHOT); > -} No need to respin, but this function has nothing to do with the other functions. This function is about -drive snapshot=on, the others are about internal snapshots. It should not go into block/snapshot.c. At least it should be documented as having nothing to do with internal snapshots. Stefan