From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42080 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ObFKu-00041y-Kn for qemu-devel@nongnu.org; Tue, 20 Jul 2010 12:06:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ObFKr-0006Nk-Go for qemu-devel@nongnu.org; Tue, 20 Jul 2010 12:06:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:15587) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ObFKr-0006NV-6U for qemu-devel@nongnu.org; Tue, 20 Jul 2010 12:06:25 -0400 Message-ID: <4C45C97C.9040006@redhat.com> Date: Tue, 20 Jul 2010 18:06:20 +0200 From: Jes Sorensen MIME-Version: 1.0 References: <1279639056-20465-1-git-send-email-Jes.Sorensen@redhat.com> <4C45C355.2000204@codemonkey.ws> <4C45C87C.4060709@redhat.com> <4C45C8DC.9000200@codemonkey.ws> In-Reply-To: <4C45C8DC.9000200@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] Disable O_DIRECT for physical CDROM/DVD drives List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org On 07/20/10 18:03, Anthony Liguori wrote: > On 07/20/2010 11:02 AM, Jes Sorensen wrote: >> On 07/20/10 17:40, Anthony Liguori wrote: >>> Wouldn't a better solution be to have a cdrom_read/cdrom_write hook that >>> did the appropriate bouncing? >>> >>> Silently disabling something a user explicitly asked for is not a good >>> option. In the very least, it should error out entirely. >>> >> I thought about this, but it would require basically fixing up or >> copying all of the pread/pwrite code to use the right block size. This >> is really more of a band-aid but it should be pretty safe. > > Please throw an error. If a user explicitly asks for something, and we > can provide it, we should not continue. Changing it to something else > is a bug. > > That doesn't apply when we're changing a default value, but if the user > asks for something, we should give it to them or fail. Ok that seems fair enough! I'll post an updated patch in a minute. Cheers, Jes