From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:50576 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751402AbdGQQRI (ORCPT ); Mon, 17 Jul 2017 12:17:08 -0400 Date: Mon, 17 Jul 2017 18:17:05 +0200 From: Jan Kara To: Jeff Moyer Cc: Lukas Czerner , Jan Kara , linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk Subject: Re: [PATCH v2] fs: Fix page cache inconsistency when mixing buffered and AIO DIO Message-ID: <20170717161705.GA22195@quack2.suse.cz> References: <1499959036-9275-1-git-send-email-lczerner@redhat.com> <1500046823-25256-1-git-send-email-lczerner@redhat.com> <20170717151228.GG18199@quack2.suse.cz> <20170717152812.46yqfot6jkoqqgax@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon 17-07-17 11:39:09, Jeff Moyer wrote: > Lukas Czerner writes: > > > About the error case, is it not possible that some data has already been > > writtent to the disk despite the error ? > > Yes, it's possible. However, that data is in an inconsistent state, so > it shouldn't be read, anyway. > > Now, in the non-async path, we do the invalidation unconditionally, so I > could go either way on this. I don't think it's going to matter for > performance or data integrity. Well, at least 'ret' would be negative in the error case so arguments passed to invalidate_inode_pages2_range() would be bogus if I'm reading the code right... Honza -- Jan Kara SUSE Labs, CR