From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK52s-0004Y7-5P for qemu-devel@nongnu.org; Thu, 12 Sep 2013 07:26:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VK52m-0007ze-Pv for qemu-devel@nongnu.org; Thu, 12 Sep 2013 07:26:46 -0400 Received: from mail-bk0-f46.google.com ([209.85.214.46]:39333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VK52m-0007zA-Ka for qemu-devel@nongnu.org; Thu, 12 Sep 2013 07:26:40 -0400 Received: by mail-bk0-f46.google.com with SMTP id 6so4073185bkj.19 for ; Thu, 12 Sep 2013 04:26:39 -0700 (PDT) Message-ID: <5231A524.2080103@profitbricks.com> Date: Thu, 12 Sep 2013 13:27:32 +0200 From: Jack Wang MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [RFC] O_EXCL or not open block device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dongsu Park , qemu-devel Cc: kwolf@redhat.com, Paolo Bonzini , NeilBrown , Stefan Hajnoczi Hi all, We're using qemu export md-raid to guest OS, and we saw deadlock on MD(which is already fixed by Neil), please see thread below: > http://marc.info/?l=linux-raid&m=137894040228125&w=2 As Neil suggested it would be good for userspace applications to call open() with O_EXCL flag, to avoid such MD hanging problems at the begining. And we checked qemu, it looks it doesn't include O_EXCL flag when open block device. After search in the mail list we found there are a similar discussion: https://lists.nongnu.org/archive/html/qemu-devel/2011-04/msg00722.html > To O_EXCL or not to O_EXCL open host_cdrom Which looks prefer enable O_EXCL, but I checked latest qemu tree, there no such code, could anyone give comments on this? Best regards, Jack