From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754786AbbJGPnI (ORCPT ); Wed, 7 Oct 2015 11:43:08 -0400 Received: from imap.thunk.org ([74.207.234.97]:36831 "EHLO imap.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753651AbbJGPnG (ORCPT ); Wed, 7 Oct 2015 11:43:06 -0400 Date: Wed, 7 Oct 2015 11:43:03 -0400 From: "Theodore Ts'o" To: Linus Torvalds Cc: Dave Hansen , Andrew Morton , "linux-ext4@vger.kernel.org" , Linux Kernel Mailing List Subject: Re: [REGRESSION] 998ef75ddb and aio-dio-invalidate-failure w/ data=journal Message-ID: <20151007154303.GC24678@thunk.org> Mail-Followup-To: Theodore Ts'o , Linus Torvalds , Dave Hansen , Andrew Morton , "linux-ext4@vger.kernel.org" , Linux Kernel Mailing List References: <20151005152236.GA8140@thunk.org> <5612BBB3.7010201@intel.com> <20151007033448.GB24678@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: tytso@thunk.org X-SA-Exim-Scanned: No (on imap.thunk.org); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 07, 2015 at 08:32:16AM +0100, Linus Torvalds wrote: > And none of *those* requirements change just because "copied" would be > zero. If you avoid zeroing the buffers and marking them dirty, nothing > will ever initialize them on disk, andn if the prefault then later > fails during retry, no later write will happen either. So now > eventually later, a read() can see stale data from disk. Shoot. You're right, we could end up allowing a stale data to be exposed. If we knew the caller of write_end() was guaranteed to retry, we could skip the jbd2_journal_stop() call and keep the handle open, which would prevent the transaction from closing. But if the write gets abandoned, then the transaction would never close, and things would grind to a halt. > I do think this is an ext4 bug, and you'll need to do something *like* > that patch. Maybe Dave's patch is good as-is. It's the "I think you > need to do more" that I worry about. Not at -rc4 time. Not with a core > filesystem like ext4. Let's not hurry this too much. Agreed, I know what to do, and and the change is not something I'd want to get in -rc4. I'll target a fix for the next merge window. - Ted