From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBd6-0006GQ-Ua for qemu-devel@nongnu.org; Tue, 27 Jan 2015 14:16:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGBd2-0001kr-Qm for qemu-devel@nongnu.org; Tue, 27 Jan 2015 14:16:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBd2-0001kl-JI for qemu-devel@nongnu.org; Tue, 27 Jan 2015 14:16:48 -0500 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 t0RJGmpn028070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 27 Jan 2015 14:16:48 -0500 Message-ID: <54C7E41E.7030206@redhat.com> Date: Tue, 27 Jan 2015 14:16:46 -0500 From: Max Reitz MIME-Version: 1.0 References: <1422288204-29271-1-git-send-email-mreitz@redhat.com> <1422288204-29271-7-git-send-email-mreitz@redhat.com> <54C7E3E7.5030808@redhat.com> In-Reply-To: <54C7E3E7.5030808@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 06/50] block: Add blk_is_available() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Jeff Cody , Markus Armbruster , Stefan Hajnoczi , john@redhat.com On 2015-01-27 at 14:15, Eric Blake wrote: > On 01/26/2015 09:02 AM, Max Reitz wrote: >> blk_is_available() returns true iff the BDS is inserted (which means >> blk_bs() is not NULL and bdrv_is_inserted() returns true) and if the >> tray of the guest device is closed. >> >> blk_is_inserted() is changed to return true only if blk_bs() is not >> NULL. >> >> Signed-off-by: Max Reitz >> --- >> block/block-backend.c | 7 ++++++- >> include/sysemu/block-backend.h | 1 + >> 2 files changed, 7 insertions(+), 1 deletion(-) >> >> +++ b/include/sysemu/block-backend.h >> @@ -127,6 +127,7 @@ int blk_enable_write_cache(BlockBackend *blk); >> void blk_set_enable_write_cache(BlockBackend *blk, bool wce); >> void blk_invalidate_cache(BlockBackend *blk, Error **errp); >> int blk_is_inserted(BlockBackend *blk); > Should we change blk_is_inserted to return bool? Seems like a good opportunity to. Will do. >> +bool blk_is_available(BlockBackend *blk); > Looks reasonable. > Reviewed-by: Eric Blake Thank you for tackling this series! Max