From patchwork Tue Aug 30 16:25:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 9305651 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1AC97607F0 for ; Tue, 30 Aug 2016 16:25:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0B9F528C8B for ; Tue, 30 Aug 2016 16:25:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0041E28C8D; Tue, 30 Aug 2016 16:25:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from oss.sgi.com (oss.sgi.com [192.48.182.195]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6162B28C8B for ; Tue, 30 Aug 2016 16:25:52 +0000 (UTC) Received: from oss.sgi.com (localhost [IPv6:::1]) by oss.sgi.com (Postfix) with ESMTP id 6AD1B7CA4; Tue, 30 Aug 2016 11:25:51 -0500 (CDT) X-Original-To: xfs@oss.sgi.com Delivered-To: xfs@oss.sgi.com Received: from relay.sgi.com (relay1.corp.sgi.com [137.38.102.111]) by oss.sgi.com (Postfix) with ESMTP id 3CF367CA0 for ; Tue, 30 Aug 2016 11:25:49 -0500 (CDT) Received: from cuda.sgi.com (cuda1.sgi.com [192.48.157.11]) by relay1.corp.sgi.com (Postfix) with ESMTP id DA5DB8F804C for ; Tue, 30 Aug 2016 09:25:48 -0700 (PDT) X-ASG-Debug-ID: 1472574346-0bf8155c753a41a0001-NocioJ Received: from mail-oi0-f46.google.com (mail-oi0-f46.google.com [209.85.218.46]) by cuda.sgi.com with ESMTP id kwtpTBsAQW1UB9Lu (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 30 Aug 2016 09:25:47 -0700 (PDT) X-Barracuda-Envelope-From: dan.j.williams@intel.com X-Barracuda-Effective-Source-IP: mail-oi0-f46.google.com[209.85.218.46] X-Barracuda-Apparent-Source-IP: 209.85.218.46 Received: by mail-oi0-f46.google.com with SMTP id j203so33249474oih.2 for ; Tue, 30 Aug 2016 09:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YcSSKRoms9I7PyIc9Do2dfbyUpu9BoQmo/CT2tTpNQw=; b=fccwvwGmblrlC9QfILmSv+iHXZ2rc8dDD26tzPuGA5Uq8UuH6oitvll0gzsNOFDrt6 oTqtMxOHAAMrjUZvSsOuwKh2vXPF2xZFzJh9KoaP0U4Fc7M77JPw+PrEp8xIY2cYP/Gn PutHY2+T5Bb//LksNmJU4aDe4vHJVyM6z1D8Qn/DM0lXw+Lmka7//HrmcFV2nCLmBNWt vG+z1yDrWxhvHqwFrgaAcHyeaICWSb0KWmsQhSdXVuJy0OE1usmv+yWpCOzh+8xENHVW NFmQCqriuNIeJh/a4UXUaiAX5AAe0Mfgi+k53l8adtXVYaYZb2v/ECXkbGtoeF4eNslR 9TdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YcSSKRoms9I7PyIc9Do2dfbyUpu9BoQmo/CT2tTpNQw=; b=VfgxFxtXLCQE+ZmsGr4tcjUGsJAIU86EeGBQT3L43UGHIh8ghvblnTDcdT26KxsX85 2Fqtz01bqK++Ly3dA8WwIXFK2qef+LvUKesPCmKQIqEOjM46MPVt26NREpxxSZT4jeMO kkpiTWPB680Fwb9uJNhBPFZIKZRM9ZhV3zhQVL/2BiuSvAG7XMTKwWnCS2/iny6F+9FP k3o5b1JP+u/HsaRKYCl0Er9VJ+hTIGAZCNnt8ojeqCRkO9SJQNZbHkcPlIF9pUJXj4ui zhOz67+BIjpSbyxzet2SODDYe/3FMfmQX4WiQFbnjGBSAPA5984Mnk8EB22FEF7Xt7wr aKZA== X-Gm-Message-State: AE9vXwOBA1pXB72ODcQAXWhuRtwqQDRIlmJDWlDCWJ9JfiSY77mRfpe6FIWPqeZWrJqeZUAE6vUtkwpOEagm+IUx X-Received: by 10.157.46.113 with SMTP id c46mr4971552otd.29.1472574346314; Tue, 30 Aug 2016 09:25:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.157.7.232 with HTTP; Tue, 30 Aug 2016 09:25:45 -0700 (PDT) In-Reply-To: References: <20160804024514.GA2906@xzhoul.usersys.redhat.com> <20160830023727.GH22760@birch.djwong.org> From: Dan Williams Date: Tue, 30 Aug 2016 09:25:45 -0700 Message-ID: Subject: Re: xfstests xfs fuzzers fail with DAX To: "Darrick J. Wong" X-ASG-Orig-Subj: Re: xfstests xfs fuzzers fail with DAX X-Barracuda-Connect: mail-oi0-f46.google.com[209.85.218.46] X-Barracuda-Start-Time: 1472574346 X-Barracuda-Encrypted: ECDHE-RSA-AES128-GCM-SHA256 X-Barracuda-URL: https://192.48.157.11:443/cgi-mod/mark.cgi X-Barracuda-Scan-Msg-Size: 3071 X-Virus-Scanned: by bsmtpd at sgi.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using per-user scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=2.7 tests=BSF_SC0_MISMATCH_TO, DKIM_SIGNED, DKIM_VERIFIED X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.32460 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header -0.00 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.00 DKIM_SIGNED Domain Keys Identified Mail: message has a signature Cc: linux-nvdimm , "linux-kernel@vger.kernel.org" , XFS Developers X-BeenThere: xfs@oss.sgi.com X-Mailman-Version: 2.1.14 Precedence: list List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Aug 30, 2016 at 7:53 AM, Dan Williams wrote: > On Mon, Aug 29, 2016 at 7:37 PM, Darrick J. Wong > wrote: >> On Mon, Aug 29, 2016 at 06:50:05PM -0700, Dan Williams wrote: >>> [ Adding Darrick on the off chance that this triggers an "aha, of >>> course it does!" ] >> >> Aha! Of course it does!!! :) > > Heh, thanks :). And apologies to Dave for missing his earlier note > pointing out the delalloc failure, linux-nvdimm list ate the response. > >> >>> Darrick these corruption tests you added to xfstests last year all >>> fail the same way with DAX enabled. They spew: >>> >>> "pwrite64: Structure needs cleaning" >>> >>> ...reports that are cleaned up by running without "-o dax". >> >> I think this happens because in non-dax mode, the pwrite is a buffered >> write and so long as we can create a delalloc reservation, everything >> is ok and nothing fails. Whereas for dax we have to allocate the >> blocks for the pwrite immediately, thereby triggering the cntbt >> verifier error. >> >> Proceeding from the assumption "DAX behaves a lot like DIO", all the >> tests that rely on buffered mode semantics are going to choke if DAX >> is turned on without them knowing about it. >> >>> Alternatively you could sit back and watch me try to figure it out, >>> that should be quite entertaining... as a start I'll try to pin down a >>> stack trace when the error is returned. >> >> As for how to fix this, probably the best option is to change line 98 >> to 'pwrite -W -S 0x62...' and update the output to include the >> 'structure needs cleaning' message. > > I'll give it a shot. So, that did not modulate the failure or the passing case. However, using -d at line 122 makes the no-dax case fail the same as the dax case. Would a change like this be acceptable in the interim while we figure out which tests are delalloc sensitive, or did I just invalidate the test? diff --git a/tests/xfs/086 b/tests/xfs/086 index 143915bafaa1..26607c7a4697 100755 --- a/tests/xfs/086 +++ b/tests/xfs/086 @@ -96,7 +96,7 @@ _scratch_mount echo "+ modify files" for x in `seq 1 64`; do - $XFS_IO_PROG -f -c "pwrite -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full + $XFS_IO_PROG -f -c "pwrite -d -S 0x62 0 ${blksz}" "${TESTFILE}.${x}" >> $seqres.full done umount "${SCRATCH_MNT}" @@ -119,7 +119,7 @@ echo "broken: ${broken}" # Try appending again, now that we've fixed the fs echo "+ modify files (2)" for x in `seq 1 64`; do - $XFS_IO_PROG -f -c "pwrite -S 0x62 ${blksz} ${blksz}" "${TESTFILE}.${x}" >> $seqres.fu + $XFS_IO_PROG -f -c "pwrite -d -S 0x62 ${blksz} ${blksz}" "${TESTFILE}.${x}" >> $seqres done umount "${SCRATCH_MNT}" diff --git a/tests/xfs/086.out b/tests/xfs/086.out index 6c053f42deea..e2ec84e6b90f 100644 --- a/tests/xfs/086.out +++ b/tests/xfs/086.out @@ -16,5 +16,5 @@ broken: 1 + mount image + chattr -R -i + check files (2) -broken: 0 +broken: 1 + check fs (2)