From patchwork Thu Oct 14 12:24:00 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Bharadwaj X-Patchwork-Id: 67810 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C8ADFB70F5 for ; Thu, 14 Oct 2010 23:26:12 +1100 (EST) Received: from localhost ([127.0.0.1]:44988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6Msq-0007kP-J7 for incoming@patchwork.ozlabs.org; Thu, 14 Oct 2010 08:26:08 -0400 Received: from [140.186.70.92] (port=51993 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6MrF-0007ig-FI for qemu-devel@nongnu.org; Thu, 14 Oct 2010 08:24:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6MrE-0003Vm-FL for qemu-devel@nongnu.org; Thu, 14 Oct 2010 08:24:29 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:35567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6MrD-0003VN-Ou for qemu-devel@nongnu.org; Thu, 14 Oct 2010 08:24:28 -0400 Received: from d28relay05.in.ibm.com (d28relay05.in.ibm.com [9.184.220.62]) by e28smtp06.in.ibm.com (8.14.4/8.13.1) with ESMTP id o9ECOOfl026373 for ; Thu, 14 Oct 2010 17:54:24 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay05.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o9ECOLB53031122 for ; Thu, 14 Oct 2010 17:54:21 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o9ECOKbH009658 for ; Thu, 14 Oct 2010 23:24:20 +1100 Received: from localhost6.localdomain6 ([9.77.206.195]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o9ECOCFS009470 for ; Thu, 14 Oct 2010 23:24:19 +1100 To: qemu-devel@nongnu.org From: Arun R Bharadwaj Date: Thu, 14 Oct 2010 17:54:00 +0530 Message-ID: <20101014122400.2238.57159.stgit@localhost6.localdomain6> In-Reply-To: <20101014122217.2238.94995.stgit@localhost6.localdomain6> References: <20101014122217.2238.94995.stgit@localhost6.localdomain6> User-Agent: StGit/0.15 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: [Qemu-devel] [PATCH 3/9] Global rename lock X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Sripathi Kodi --- hw/virtio-9p.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-9p.c b/hw/virtio-9p.c index 02a4ec4..ef6175a 100644 --- a/hw/virtio-9p.c +++ b/hw/virtio-9p.c @@ -21,6 +21,8 @@ int debug_9p_pdu; +QemuRWMutex global_rename_lock; + enum { Oread = 0x00, Owrite = 0x01, @@ -3906,6 +3908,7 @@ VirtIODevice *virtio_9p_init(DeviceState *dev, V9fsConf *conf) QTAILQ_INIT(&v9fs_async_struct.post_op_list); qemu_mutex_init(&(v9fs_async_struct.lock)); qemu_rwmutex_init(&(s->fid_list_lock)); + qemu_rwmutex_init(&global_rename_lock); /* Create async queue. */ (void)v9fs_do_async_posix;