From mboxrd@z Thu Jan 1 00:00:00 1970 From: Antoine Martin Subject: Re: raw disks no longer work in latest kvm (kvm-88 was fine) Date: Sun, 23 May 2010 23:18:21 +0700 Message-ID: <4BF9554D.3000100@nagafix.co.uk> References: <4B92BF97.4040001@nagafix.co.uk> <4B932829.8090503@nagafix.co.uk> <4B9372B6.3050408@msgid.tls.msk.ru> <20100307100022.GA23201@infradead.org> <4B93A624.8010707@nagafix.co.uk> <4B93AF8A.3070805@nagafix.co.uk> <4B93C2F9.7030904@msgid.tls.msk.ru> <4B93DE3F.4090103@nagafix.co.uk> <4B93DFF0.5050905@redhat.com> <20100307172151.GA24859@infradead.org> <4B93E29E.6090609@redhat.com> <4B93E9EE.6020701@nagafix.co.uk> <4B93F4A4.9050003@redhat.com> <4B93F96E.30508@nagafix.co.uk> <4B93FA18.2090808@redhat.com> <4B93FAD8.9010207@nagafix.co.uk> <4B93FBC1.3000209@redhat.com> <4B93FD94.7060508@nagafix.co.uk> <4B93FFEE.4080007@redhat.com> <4B9B6008.4090902@nagafix.co.uk> <4BBE51F4.6070904@nagafix.co.uk> <4BF7B589.1070808@nagafix.co.uk> <4BF7BD33.2090700@msgid.tls.msk.ru> <4BF7C172.2000508@nagafix.co .uk> <4BF8ED0C.2070004@nagafix.co.uk> <4BF91844.8030903@redhat.com> <4BF936BB.5000401@nagafix.co.uk> <4BF9391A.1080302@redhat.com> <4BF93EF5.5090106@nagafix.co.uk> <4BF945E4.8080209@redhat.c om> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Michael Tokarev , Christoph Hellwig , kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mamba.nagafix.co.uk ([194.145.196.68]:40171 "EHLO mail.nagafix.co.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752188Ab0EWQSa (ORCPT ); Sun, 23 May 2010 12:18:30 -0400 In-Reply-To: <4BF945E4.8080209@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/23/2010 10:12 PM, Avi Kivity wrote: > On 05/23/2010 05:43 PM, Antoine Martin wrote: >>>> Description of the problem: >>>> A guest tries to mount a large raw partition (1.5TB /dev/sda9 in my >>>> case), this fails with pread enabled, works with it disabled. >>> >>> Did you mean: preadv? >> >> Yes, here's what makes it work ok (as suggested by Christoph earlier >> in the thread) in posix-aio-compat.c: >> #undef CONFIG_PREADV >> #ifdef CONFIG_PREADV >> static int preadv_present = 1; >> #else >> static int preadv_present = 0; >> #endif > > When preadv_present=1, does strace -fF show preadv being called? There were some pread() but no preadv() in the strace BTW. > If so, the kernel's preadv() is broken. > > If not, glibc's preadv() emulation is broken. OK, I found what's causing it: chroot I was testing all this in a chroot, I always do and I didn't think of mentioning it, sorry about that. Running it non-chrooted works in all cases, including aio!=native Why does it work in a chroot for the other options (aio=native, if=ide, etc) but not for aio!=native?? Looks like I am misunderstanding the semantics of chroot... >>> >>> Does aio=native help? >> It does indeed! > > That's recommended anyway on raw partitions with cache=off. > What about non-raw partitions (or/and with cache=on)? Antoine