X-Spam-Checker-Version: SpamAssassin 3.4.0-r929098 (2010-03-30) on oss.sgi.com X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.4.0-r929098 Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by oss.sgi.com (8.14.3/8.14.3/SuSE Linux 0.8) with ESMTP id oA9MX9dP176493 for ; Tue, 9 Nov 2010 16:33:09 -0600 X-ASG-Debug-ID: 1289342074-35bb02d60000-NocioJ X-Barracuda-URL: http://cuda.sgi.com:80/cgi-bin/mark.cgi Received: from mail.internode.on.net (localhost [127.0.0.1]) by cuda.sgi.com (Spam Firewall) with ESMTP id 29BC81683E8 for ; Tue, 9 Nov 2010 14:34:35 -0800 (PST) Received: from mail.internode.on.net (bld-mail17.adl2.internode.on.net [150.101.137.102]) by cuda.sgi.com with ESMTP id PPCgbXNX64NIqMeh for ; Tue, 09 Nov 2010 14:34:35 -0800 (PST) Received: from dastard (unverified [121.44.100.105]) by mail.internode.on.net (SurgeMail 3.8f2) with ESMTP id 45687371-1927428 for multiple; Wed, 10 Nov 2010 09:04:28 +1030 (CDT) Received: from dave by dastard with local (Exim 4.71) (envelope-from ) id 1PFwlm-00048T-V1; Wed, 10 Nov 2010 09:34:26 +1100 Date: Wed, 10 Nov 2010 09:34:26 +1100 From: Dave Chinner To: Christoph Hellwig Cc: xfs@oss.sgi.com, Marius Tolzmann X-ASG-Orig-Subj: Re: [PATCH] xfstests: check block truncation after write failure Subject: Re: [PATCH] xfstests: check block truncation after write failure Message-ID: <20101109223426.GO2715@dastard> References: <20101109114923.GA29629@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101109114923.GA29629@infradead.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Barracuda-Connect: bld-mail17.adl2.internode.on.net[150.101.137.102] X-Barracuda-Start-Time: 1289342076 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.2.46170 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on oss.sgi.com X-Virus-Status: Clean On Tue, Nov 09, 2010 at 06:49:23AM -0500, Christoph Hellwig wrote: > Extraced from https://bugzilla.kernel.org/show_bug.cgi?id=22452 > "data corruption after mmap()ing a file and writev() some data to another file" > > Signed-off-by: Christoph Hellwig Looks good. One comment below.... Reviewed-by: Dave Chinner > +{ > + rm -rf $file > + rm -rf $file.NEW > +} > + > +trap "_cleanup ; exit \$status" 0 1 2 3 15 > + > +echo -n "cccccccccc" > $file > +$here/src/t_mmap_writev $file $file.NEW > +xxd $file.NEW xxd - on debian that's packaged in the vim-common package, which not everyone will have installed (e.g. emacs users ;). Better to use 'od -Ax' as od is part of coreutils and already used in other qa tests so we don't introduce a new external dependency... CHeers, Dave. -- Dave Chinner david@fromorbit.com