Received: with ECARTIS (v1.0.0; list xfs); Fri, 15 Aug 2008 15:39:33 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.0-r574664 (2007-09-11) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.0-r574664 Received: from cuda.sgi.com (cuda1.sgi.com [192.48.168.28]) by oss.sgi.com (8.12.11.20060308/8.12.11/SuSE Linux 0.7) with ESMTP id m7FMdTAA024607 for ; Fri, 15 Aug 2008 15:39:30 -0700 X-ASG-Debug-ID: 1218840048-1f0900a90000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from bombadil.infradead.org (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 09A19F528B9; Fri, 15 Aug 2008 15:40:48 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) by cuda.sgi.com with ESMTP id DcSkTr68evj1eTOB; Fri, 15 Aug 2008 15:40:48 -0700 (PDT) Received: from hch by bombadil.infradead.org with local (Exim 4.68 #1 (Red Hat Linux)) id 1KU7yR-0006aQ-V5; Fri, 15 Aug 2008 22:40:47 +0000 Date: Fri, 15 Aug 2008 18:40:47 -0400 From: Christoph Hellwig To: Andrew Morton Cc: Christoph Hellwig , lachlan@sgi.com, xfs-dev@sgi.com, xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org X-ASG-Orig-Subj: Re: [REVIEW] Prevent direct I/O from mapping extents beyond eof Subject: Re: [REVIEW] Prevent direct I/O from mapping extents beyond eof Message-ID: <20080815224047.GA15914@infradead.org> References: <48A50152.8020104@sgi.com> <20080815220958.GB13770@infradead.org> <20080815152756.61aab5a7.akpm@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080815152756.61aab5a7.akpm@linux-foundation.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html X-Barracuda-Connect: bombadil.infradead.org[18.85.46.34] X-Barracuda-Start-Time: 1218840049 X-Barracuda-Bayes: INNOCENT GLOBAL 0.0000 1.0000 -2.0210 X-Barracuda-Virus-Scanned: by cuda.sgi.com at sgi.com X-Barracuda-Spam-Score: -2.02 X-Barracuda-Spam-Status: No, SCORE=-2.02 using per-user scores of TAG_LEVEL=2.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.1 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.1.2676 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV 0.91.2/8048/Fri Aug 15 05:56:27 2008 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 17580 X-ecartis-version: Ecartis v1.0.0 Sender: xfs-bounce@oss.sgi.com Errors-to: xfs-bounce@oss.sgi.com X-original-sender: hch@infradead.org Precedence: bulk X-list: xfs On Fri, Aug 15, 2008 at 03:27:56PM -0700, Andrew Morton wrote: > Oh gee, I forget, and so many people have done drivebys on that code... > > We _could_ add additional i_size checking into direct-io.c but bear in > mind that it would be best-effort unreliable stuff. The code will > still be tripped up by concurrent extends and concurrent truncates. > > So we'll still end up calling the fs for blocks outside i_size, only > less commonly. I think. Yeah, guess we should put in this patch then.