From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEE3v-0001UG-3e for qemu-devel@nongnu.org; Tue, 27 Aug 2013 03:51:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEE3m-0003Ct-75 for qemu-devel@nongnu.org; Tue, 27 Aug 2013 03:51:39 -0400 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:38561) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEE3l-0003Cd-GL for qemu-devel@nongnu.org; Tue, 27 Aug 2013 03:51:30 -0400 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 27 Aug 2013 13:13:32 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id A5BBBE004F for ; Tue, 27 Aug 2013 13:21:56 +0530 (IST) Received: from d28av04.in.ibm.com (d28av04.in.ibm.com [9.184.220.66]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r7R7qv0336569196 for ; Tue, 27 Aug 2013 13:22:58 +0530 Received: from d28av04.in.ibm.com (localhost [127.0.0.1]) by d28av04.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id r7R7pJMM016583 for ; Tue, 27 Aug 2013 13:21:19 +0530 From: Wenchao Xia Date: Tue, 27 Aug 2013 15:49:22 +0800 Message-Id: <1377589765-30215-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [RFC PATCH 0/3] move global bdrv_states out of block.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, Wenchao Xia , stefanha@redhat.com In order to support multiple caller from different thread, global inside block layer should be carefully treated. bdrv_states represent a group of bds* which is now used by qemu, so it is a user concept which should be managed by user. This series tries to move it out, so later different thread can feed the API with its own bds* group. This is a RFC series which does not completely convert the API, the missing part is adding parameter *l in all API which uses bdrv_states, then move bdrv_states to caller. About 10 functions need to be converted, so hope to get comments before that, to see if this is the right direction. Wenchao Xia (3): 1 block: add typedef for BlockDriverState queue 2 block: add function qemu_get_bds_queue 3 block: add parameter bds queue in bdrv_invalidate_cache_all() block.c | 11 ++++++++--- include/block/block.h | 7 ++++++- migration.c | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-)