From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YuO54-0000MC-85 for qemu-devel@nongnu.org; Mon, 18 May 2015 12:39:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YuO53-0005NW-9x for qemu-devel@nongnu.org; Mon, 18 May 2015 12:39:54 -0400 Message-ID: <555A15A7.6050209@redhat.com> Date: Mon, 18 May 2015 18:39:03 +0200 From: Max Reitz MIME-Version: 1.0 References: <7ce47b7b6d35bfeb24141e36dda1b53ba2b970a4.1431523498.git.berto@igalia.com> In-Reply-To: <7ce47b7b6d35bfeb24141e36dda1b53ba2b970a4.1431523498.git.berto@igalia.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 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: qemu-block@nongnu.org On 13.05.2015 15:27, 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 > --- > block/io.c | 21 ++++++++------------- > blockdev.c | 19 ++++++++----------- > blockjob.c | 13 +++++++++++++ > include/block/blockjob.h | 14 ++++++++++++++ > 4 files changed, 43 insertions(+), 24 deletions(-) Reviewed-by: Max Reitz