Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765996AbXJZWyV (ORCPT ); Fri, 26 Oct 2007 18:54:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752382AbXJZWyM (ORCPT ); Fri, 26 Oct 2007 18:54:12 -0400 Received: from tetsuo.zabbo.net ([207.173.201.20]:40487 "EHLO tetsuo.zabbo.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751848AbXJZWyK (ORCPT ); Fri, 26 Oct 2007 18:54:10 -0400 Message-ID: <47227015.6060708@oracle.com> Date: Fri, 26 Oct 2007 15:54:13 -0700 From: Zach Brown User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Linus Torvalds CC: Karl Schendel , Benjamin LaHaise , Andrew Morton , Linux Kernel Mailing List , Nick Piggin , Leonid Ananiev , Chris Mason Subject: Re: [PATCH] Fix bad data from non-direct-io read after direct-io write References: <47225835.4050309@datallegro.com> <47226A75.1020008@oracle.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 895 Lines: 24 Linus Torvalds wrote: > > On Fri, 26 Oct 2007, Zach Brown wrote: >> I think that test should be changed to > > How about not testing at all? Which was what the old code did. > > Just do the invalidate unconditionally for any writes, and screw the end > result of the invalidate, since we cannot afford to overwrite the previous > return value anyway in any realistic scenario? I'm reasonably comfortable with that, sure. This second invalidation only catches reads which userspace raced with the write, and that's already racy by definition. I can throw together a patch if you haven't already committed one by the time you read this ;). - z - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/