From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiOK0-0006jB-0L for qemu-devel@nongnu.org; Wed, 15 Apr 2015 10:29:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiOJu-0001HP-78 for qemu-devel@nongnu.org; Wed, 15 Apr 2015 10:29:43 -0400 Message-ID: <552E75C5.7060902@redhat.com> Date: Wed, 15 Apr 2015 16:29:25 +0200 From: Max Reitz MIME-Version: 1.0 References: <53b4df6cefd01ef68a494c8e39bf75868030e427.1428503789.git.berto@igalia.com> In-Reply-To: <53b4df6cefd01ef68a494c8e39bf75868030e427.1428503789.git.berto@igalia.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 1/6] 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 On 08.04.2015 16:43, 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 everytime one is > created or destroyed. > > This also updates qmp_query_block_jobs() to use this new list. > > Signed-off-by: Alberto Garcia > --- > blockdev.c | 19 ++++++++----------- > blockjob.c | 13 +++++++++++++ > include/block/blockjob.h | 14 ++++++++++++++ > 3 files changed, 35 insertions(+), 11 deletions(-) Reviewed-by: Max Reitz