From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60948) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1arsAr-0005ew-4C for qemu-devel@nongnu.org; Sun, 17 Apr 2016 15:16:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1arsAq-0007j8-Ad for qemu-devel@nongnu.org; Sun, 17 Apr 2016 15:16:01 -0400 Date: Sun, 17 Apr 2016 20:15:52 +0100 From: "Richard W.M. Jones" Message-ID: <20160417191552.GI19398@redhat.com> References: <1460538604-12132-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1460538604-12132-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.7 00/15] block: Lock images when opening List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-devel@nongnu.org, Kevin Wolf , qemu-block@nongnu.org, Jeff Cody , Markus Armbruster , Max Reitz , den@openvz.org, pbonzini@redhat.com, John Snow On Wed, Apr 13, 2016 at 05:09:49PM +0800, Fam Zheng wrote: > Underneath is the fcntl syscall that locks the local file, similar to what is > already used in libvirt virtlockd. Also because of that, we cannot directly > apply fcntl lock on the image file itself, instead we open and lock > "/var/tmp/.qemu-$sha1.lock", where $sha1 is derived Any particular reason why not /tmp instead of /var/tmp? I assume these are zero-sized or otherwise small files. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com Fedora Windows cross-compiler. Compile Windows programs, test, and build Windows installers. Over 100 libraries supported. http://fedoraproject.org/wiki/MinGW