From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Armbruster Subject: Re: [Qemu-devel] KVM call agenda for October 25 Date: Wed, 26 Oct 2011 10:48:12 +0200 Message-ID: References: <4EA6ACFE.6090109@redhat.com> <4EA6B41B.3000903@codemonkey.ws> <4EA6C00B.3030701@redhat.com> <4EA6C25C.8000502@codemonkey.ws> <4EA7C1B8.9000903@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Anthony Liguori , Paolo Bonzini , qemu-devel@nongnu.org, kvm@vger.kernel.org To: Kevin Wolf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36033 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932413Ab1JZIsR (ORCPT ); Wed, 26 Oct 2011 04:48:17 -0400 In-Reply-To: <4EA7C1B8.9000903@redhat.com> (Kevin Wolf's message of "Wed, 26 Oct 2011 10:15:52 +0200") Sender: kvm-owner@vger.kernel.org List-ID: Kevin Wolf writes: > Am 25.10.2011 16:06, schrieb Anthony Liguori: >> On 10/25/2011 08:56 AM, Kevin Wolf wrote: >>> Am 25.10.2011 15:05, schrieb Anthony Liguori: >>>> I'd be much more open to changing the default mode to cache=none FWIW since the >>>> risk of data loss there is much, much lower. >>> >>> I think people said that they'd rather not have cache=none as default >>> because O_DIRECT doesn't work everywhere. >> >> Where doesn't it work these days? I know it doesn't work on tmpfs. I know it >> works on ext[234], btrfs, nfs. > > Besides file systems (and probably OSes) that don't support O_DIRECT, > there's another case: Our defaults don't work on 4k sector disks today. > You need to explicitly specify the logical_block_size qdev property for > cache=none to work on them. > > And changing this default isn't trivial as the right value doesn't only > depend on the host disk, but it's also guest visible. The only way out > would be bounce buffers, but I'm not sure that doing that silently is a > good idea... Sector size is a device property. If the user asks for a 4K sector disk, and the backend can't support that, we need to reject the configuration. Just like we reject read-only backends for read/write disks. If the backend can only support it by using bounce buffers, I'd say reject it unless the user explicitly permits bounce buffers. But that's debatable. It's okay to default device properties to some backend-dependent value, if that improves usability.