From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56822 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PcfS1-00087Y-Q8 for qemu-devel@nongnu.org; Tue, 11 Jan 2011 09:43:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PcfS0-0002Ck-MA for qemu-devel@nongnu.org; Tue, 11 Jan 2011 09:43:57 -0500 Received: from mail-vw0-f45.google.com ([209.85.212.45]:60575) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PcfS0-0002Cc-Jj for qemu-devel@nongnu.org; Tue, 11 Jan 2011 09:43:56 -0500 Received: by vws12 with SMTP id 12so8031096vws.4 for ; Tue, 11 Jan 2011 06:43:56 -0800 (PST) Message-ID: <4D2C6C78.70606@codemonkey.ws> Date: Tue, 11 Jan 2011 08:43:04 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: KVM call agenda for Jan 11 References: <4D2C3B4D.2090709@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com Cc: Kevin Wolf , Chris Wright , qemu-devel@nongnu.org, kvm-devel On 01/11/2011 07:41 AM, Juan Quintela wrote: > Kevin Wolf wrote: > >> Am 10.01.2011 14:32, schrieb Juan Quintela: >> >>> Juan Quintela wrote: >>> >>>> Juan Quintela wrote: >>>> >>>> Now sent it to the right kvm list. Sorry for the second sent. >>>> >>>> >>>>> Please send any agenda items you are interested in covering. >>>>> >>>>> - KVM Forum 2011 (Jes). >>>>> >>>>> thanks, Juan. >>>>> >>> - migration and block devices: a mess. >>> * patches I sent last week: only work for root (for some definition of >>> work) >>> * qemu is used as non-root user. >>> * forcing to have cache=none solves the issue >>> >> I need to have a look at the specific problem, but it's hard to imagine >> that cache=none fixes anything reliably. >> > It uses O_DIRECT, that means that we don't have buffering problems. > I state the problem again: > > machine A read 1st block of device. > > machine B reads writes lots of places including 1st block > > now guest from machine A migrates to machine B > machine A re-reads the 1st block, and lo and behold, it reads the old > contents, not the new ones. > > Solutions: > - invalidate all buffers for that block device on machine A after > migration. > * with NFS, just close + reopen the file (and pray that nobody else > has it also opened) > * with block devices: use BLKFLBLK ioctl, and pray that nobody else is > using the device, that device is not a ramdisk, and some more > things. To add injury to insult, you need to be root to be able > to issue that ioctl (technically have CAP_SYS_ADMIN). > Why isn't fsync() enough for a block device? Regards, Anthony Liguori > O_DIRECT fixes this problem altogether, because there is no buffering, > and if there are not buffers, they can't be invalid O:-) > > Notice the "pray" part in the other solutions, we are basically trying > to do a "poor man" DLM, and that is not trivial to do. (althougth our > problem is not the general one, the principles are the same). > > Later, Juan. > > >