From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9YeG-0006jm-6S for qemu-devel@nongnu.org; Tue, 12 Apr 2011 04:08:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9YeF-0004tn-5b for qemu-devel@nongnu.org; Tue, 12 Apr 2011 04:08:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9YeE-0004tL-Rm for qemu-devel@nongnu.org; Tue, 12 Apr 2011 04:08:31 -0400 Message-ID: <4DA40904.2040103@redhat.com> Date: Tue, 12 Apr 2011 10:10:44 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <20110412075214.GA10071@redhat.com> In-Reply-To: <20110412075214.GA10071@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] To O_EXCL or not to O_EXCL open host_cdrom List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Stefan Hajnoczi , qemu-devel , Markus Armbruster , Ryan Harper , Amit Shah , Christoph Hellwig Am 12.04.2011 09:52, schrieb Daniel P. Berrange: > - If the -drive specification has readonly=on (thus O_RDONLY to > open(2) call) , I expect QEMU (or the kernel) to forbid the > "eject" command on the host CDROM. This should prevent two guests > interfering seriously with each other. > > So I think using O_EXCL would be OK, in the case where the block > driver was host_cdrom and readonly=off. This would overload readonly with a completely unrelated option (should eject be allowed). Doesn't sound like a great idea. Kevin