From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1D40-0002r4-A0 for qemu-devel@nongnu.org; Tue, 24 Nov 2015 07:51:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1D3z-00020O-FA for qemu-devel@nongnu.org; Tue, 24 Nov 2015 07:51:16 -0500 References: <1448342531-16407-1-git-send-email-famz@redhat.com> <1448342531-16407-2-git-send-email-famz@redhat.com> <56544E4F.9090104@redhat.com> <20151124125005.GC29832@ad.usersys.redhat.com> From: Paolo Bonzini Message-ID: <56545D3A.9000606@redhat.com> Date: Tue, 24 Nov 2015 13:51:06 +0100 MIME-Version: 1.0 In-Reply-To: <20151124125005.GC29832@ad.usersys.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH for-2.6 01/14] block: Add "file" output parameter to block status query functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , qemu-block@nongnu.org, Jeff Cody , Peter Lieven , qemu-devel@nongnu.org, Stefan Hajnoczi On 24/11/2015 13:50, Fam Zheng wrote: > > > + if (bs->file && *file == bs->file->bs && > > > > This check is unnecessary, just use "if (file)". > > "file" would be bs in the case of protocol, and this function will infinitely > recurse. Oh, that's right! But then I think we want to check that and allow recursion to any *file, not just bs->file->bs. Paolo