From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1DEa-00081e-1X for qemu-devel@nongnu.org; Tue, 24 Nov 2015 08:02:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1DEV-0005f5-BS for qemu-devel@nongnu.org; Tue, 24 Nov 2015 08:02:11 -0500 Date: Tue, 24 Nov 2015 21:01:51 +0800 From: Fam Zheng Message-ID: <20151124130151.GD29832@ad.usersys.redhat.com> 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> <56545D3A.9000606@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56545D3A.9000606@redhat.com> 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: Paolo Bonzini Cc: Kevin Wolf , qemu-block@nongnu.org, Jeff Cody , Peter Lieven , qemu-devel@nongnu.org, Stefan Hajnoczi On Tue, 11/24 13:51, Paolo Bonzini wrote: > > > 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. > That makes sense, I'll make it to. Fam