From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josef Bacik Subject: Re: testing stable pages being modified Date: Fri, 31 May 2013 10:34:13 -0400 Message-ID: <20130531143413.GG9829@localhost.localdomain> References: <20130530223610.GA24721@lenny.home.zabbo.net> <20130531051158.7927.24213@localhost.localdomain> <20130531062430.GB24721@lenny.home.zabbo.net> <20130531132907.GF9829@localhost.localdomain> <20130531135329.14188.80309@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Josef Bacik , Zach Brown , "linux-fsdevel@vger.kernel.org" , "linux-btrfs@vger.kernel.org" To: Chris Mason Return-path: Received: from dkim1.fusionio.com ([66.114.96.53]:59643 "EHLO dkim1.fusionio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752431Ab3EaOeQ (ORCPT ); Fri, 31 May 2013 10:34:16 -0400 Received: from mx1.fusionio.com (unknown [10.101.1.160]) by dkim1.fusionio.com (Postfix) with ESMTP id 470D57C0689 for ; Fri, 31 May 2013 08:34:16 -0600 (MDT) Content-Disposition: inline In-Reply-To: <20130531135329.14188.80309@localhost.localdomain> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, May 31, 2013 at 07:53:29AM -0600, Chris Mason wrote: > Quoting Josef Bacik (2013-05-31 09:29:07) > > On Fri, May 31, 2013 at 12:24:30AM -0600, Zach Brown wrote: > > > > Changing O_DIRECT in flight has always been a deep dark corner case, and > > > > crc errors are the expected result. Have you found anyone doing this in > > > > real life? > > > > > > Agreed; and no, I haven't heard of people accidentally modifying stable > > > pages. > > > > > > > Windows does this, it also will send down the same page for different offsets > > which is why we have that special check in check_direct_IO for reads because > > that would cause lots of csum errors too. I tried to fix the modified in flight > > problem by checking the csums of the pages in the io completion handler and > > re-submitting the IO if the pages had changed, but this of course dramatically > > reduced performance for all of those well behaved O_DIRECT applications, so in > > the end I just set nodatasum for that vm image and carried on. I'm not sure > > what the solution is for this problem. Thanks, > > Ugh, I forgot about the windows case. KVM should really be copying the > pages for sectors where IO is already in flight. > > We could do the copies ourselves: mount -o dio_copies > That would work for us, but what about other people that rely on stable pages, like *fs on iscsi and such? It might be good to have a generic mount option that the vfs notices and makes the copying happen before it gets to the file system and that way we're all save and don't have a different solution/mount option for each fs. Thanks, Josef