From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Lalancette Subject: Re: [PATCH]: Make Xen 3.1 IDE flush on O_DIRECT with drive caching off Date: Wed, 27 Feb 2008 22:23:10 -0500 Message-ID: <47C6291E.7080309@redhat.com> References: <47C4251A.3040000@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <47C4251A.3040000@redhat.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org Chris Lalancette wrote: > All, > Long ago Xen added code to the device model to basically do an fsync() > after every data write if the user in the guest specified that IDE write caching > should be disabled. This works fine, except in the case where you are doing > O_DIRECT writes inside the guest (ala dd if=/dev/zero of=/dev/hdb oflag=direct). > This is because you can get out of ide_write_dma_cb() in the middle of the loop > without going through the logic to sync. This simple patch makes sure that you > always check (and sync) inside the write callback. > > This patch applies to xen-3.1-testing.hg; I still have to test 3.2 (and the new > AIO code) to see if it is affected by this bug. After some testing, it looks like 3.2 is not affected by this bug, so it won't be needed there. Chris Lalancette