From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7msE-00078l-40 for qemu-devel@nongnu.org; Wed, 24 Jun 2015 11:46:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7msC-0000UQ-K2 for qemu-devel@nongnu.org; Wed, 24 Jun 2015 11:46:01 -0400 Message-ID: <558AD0AD.1090305@redhat.com> Date: Wed, 24 Jun 2015 17:45:49 +0200 From: Max Reitz MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v8 01/11] block: keep a list of block jobs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu-devel@nongnu.org Cc: Stefan Hajnoczi , qemu-block@nongnu.org, Alexander Yarygin On 22.06.2015 23:32, Alberto Garcia wrote: > The current way to obtain the list of existing block jobs is to > iterate over all root nodes and check which ones own a job. > > Since we want to be able to support block jobs in other nodes as well, > this patch keeps a list of jobs that is updated every time one is > created or destroyed. > > This also updates qmp_query_block_jobs() and bdrv_drain_all() to use > this new list. > > Signed-off-by: Alberto Garcia > Cc: Max Reitz > Cc: Eric Blake > Cc: Alexander Yarygin > --- > block/io.c | 22 +++++++++++----------- > blockdev.c | 19 ++++++++----------- > blockjob.c | 13 +++++++++++++ > include/block/blockjob.h | 14 ++++++++++++++ > 4 files changed, 46 insertions(+), 22 deletions(-) Reviewed-by: Max Reitz