Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7897838rwn; Wed, 14 Sep 2022 06:13:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR66DerRqBOLN4B4wosg0ZpWF8/1zmyfs7Ec7lR647KA4tfmnuhr7UAevU8aCO+xM0pPE1mP X-Received: by 2002:a05:6402:510c:b0:451:f363:24ee with SMTP id m12-20020a056402510c00b00451f36324eemr10868615edd.156.1663161193848; Wed, 14 Sep 2022 06:13:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663161193; cv=none; d=google.com; s=arc-20160816; b=FUyxGfWFRYzIFAdkQDc9GfHEOwEi4qHB82YZAkDTb3hnksu8wRMfD8tXZLEKgjwoOd LPj74tgqXJC6NrLMqQgrvO6Q2TVoaAQJixobYfugFXEgUJd4jDQ0CkF/DHTAxM9QS1qt 0IdOk2JVaDozdYLSTbnu8ERH5neIA9BF+VSZKcHBcpQx4cgdkvo1fHOMefCnXnmJlHKE k/XXKcHsl7wGgwSn3ZI8thrrvU4fOZq78KcchMPUB44i17NKom0vhJjaM3s0dpb+8Ou7 fDztXtfBycl83dIpYR6sHsDC5yQgWLC2+z4eR705d4yq83FmReO17Q+fX4whd77tUrkN 0PJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0WuM4/y8wFci5Yb9BetZR1iZBMrvylQvcf2F8aOMYug=; b=HVuYpiGhh892MZpknB9MIMQ2kRPfGXhOChxWiGq7eaw3zIldRlCFiN2aLJbaRwb4nH MdOPOhW2IKF3Q9HNAI1ScUuEtEH0G7ii0EIqFSqB1m/npTvM5BwQrUWCVeZ3tMuw3tbq Jq/8QI+KNqn5xAzBEBwADRSojQ3gN8NEyjZnJc3nUjwiAvYsmoQEfhh8RCqaAre2qw71 KqRRLSxPGw4WFC0TJQ1u3Rmp8iu4zqztPPH2JUXgA818oGUZoJgzDTJlZp/bAYWut2NE jlCkeNKoQHq2gFh5nbfVgd3+rIpvp7utat0pJQiAJPhRppcI/yMbvtttyxw4kkenmUtB BsFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PG+VxQZ4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g12-20020a056402090c00b00450f5384073si13961202edz.527.2022.09.14.06.12.42; Wed, 14 Sep 2022 06:13:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PG+VxQZ4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229727AbiINMem (ORCPT + 99 others); Wed, 14 Sep 2022 08:34:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbiINMeh (ORCPT ); Wed, 14 Sep 2022 08:34:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87AFB2DC7 for ; Wed, 14 Sep 2022 05:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663158872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0WuM4/y8wFci5Yb9BetZR1iZBMrvylQvcf2F8aOMYug=; b=PG+VxQZ4qmaBwKFAThufYz8hGowxNj4H98LnzhNebHEy23vKIi/QkJszVj++euEBBxGKJx Zn/0eM6iug97VQ05X6Gr3rsQwgryZw8Jx3cSVAdE9+uj5kWkuUfEqDUMRyVhDAu5f48QmY OWvvh4cwYS/BQ6/Z2NkFz3kQp/hGLeU= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-588-OEIYl9MrP4W9u8ezqUm-_w-1; Wed, 14 Sep 2022 08:34:31 -0400 X-MC-Unique: OEIYl9MrP4W9u8ezqUm-_w-1 Received: by mail-qk1-f199.google.com with SMTP id h8-20020a05620a284800b006b5c98f09fbso12987866qkp.21 for ; Wed, 14 Sep 2022 05:34:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date; bh=0WuM4/y8wFci5Yb9BetZR1iZBMrvylQvcf2F8aOMYug=; b=tSqx4qLCx05C3nUQgqn5D04DECGH9lcza0jV3VnJGbgCcFDTgwHBmayLgoZemngOQ9 4jybwgBMZhyD/gSAOoi7P0n8V9U5pi677pulU1XhpQxobE8rCUGuD3Nk2D6Of6FS0Qsk r7shiIX3XniLhZ6iRko3U0sH2IqRTXtjA0vxqbdBqszxPvS62mcmsnlAy+WuqFkr87ow Xecg0kpY0FWrwH8bJwo+DhhHp94X+Y4+2RdfMvpZRpQgSNnzO6xN41SwKZbTGs+Hs8Ef nXpjtvPgeB8McPsXjRqpxDRlkV2LK7BJ/aDx92shr3S6J2kWDbae2unIBGM0rT/S+Fzt FWCw== X-Gm-Message-State: ACgBeo2Vdvpa3gUr5aGYGQ1fmUEkJX+TnNgZt6Lt081p4yUpsJCn2Bbw nDGFrFpZbv7BbgKZFQLXsVceqdcv5QUkhl9bfLBRsG0UkzirajMHoRaHqhOb0ei24rzxhdhlBZ+ RV8SUo4W9CLTRSVw/MzLITRi9 X-Received: by 2002:ae9:ef4f:0:b0:6cb:d294:3333 with SMTP id d76-20020ae9ef4f000000b006cbd2943333mr21462394qkg.511.1663158871098; Wed, 14 Sep 2022 05:34:31 -0700 (PDT) X-Received: by 2002:ae9:ef4f:0:b0:6cb:d294:3333 with SMTP id d76-20020ae9ef4f000000b006cbd2943333mr21462371qkg.511.1663158870858; Wed, 14 Sep 2022 05:34:30 -0700 (PDT) Received: from bfoster (c-24-61-119-116.hsd1.ma.comcast.net. [24.61.119.116]) by smtp.gmail.com with ESMTPSA id b3-20020a05620a118300b006b8f4ade2c9sm1650081qkk.19.2022.09.14.05.34.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Sep 2022 05:34:29 -0700 (PDT) Date: Wed, 14 Sep 2022 08:34:26 -0400 From: Brian Foster To: =?utf-8?B?WWFuZywgWGlhby/mnagg5pmT?= Cc: =?utf-8?B?UnVhbiwgU2hpeWFuZy/pmK4g5LiW6Ziz?= , "Darrick J. Wong" , "linux-kernel@vger.kernel.org" , "linux-xfs@vger.kernel.org" , "nvdimm@lists.linux.dev" , "linux-fsdevel@vger.kernel.org" , "david@fromorbit.com" , "hch@infradead.org" Subject: Re: [PATCH] xfs: fail dax mount if reflink is enabled on a partition Message-ID: References: <74b0a034-8c77-5136-3fbd-4affb841edcb@fujitsu.com> <7fde89dc-2e8f-967b-d342-eb334e80255c@fujitsu.com> <0ea1cbe1-79d7-c22b-58bf-5860a961b680@fujitsu.com> <7fdc9e88-f255-6edb-7964-a5a82e9b1292@fujitsu.com> <76ea04b4-bad7-8cb3-d2c6-4ad49def4e05@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <76ea04b4-bad7-8cb3-d2c6-4ad49def4e05@fujitsu.com> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 14, 2022 at 05:38:02PM +0800, Yang, Xiao/杨 晓 wrote: > On 2022/9/14 14:44, Yang, Xiao/杨 晓 wrote: > > On 2022/9/9 21:01, Brian Foster wrote: > > > Yes.. I don't recall all the internals of the tools and test, but IIRC > > > it relied on discard to perform zeroing between checkpoints or some such > > > and avoid spurious failures. The purpose of running on dm-thin was > > > merely to provide reliable discard zeroing behavior on the target device > > > and thus to allow the test to run reliably. > > Hi Brian, > > > > As far as I know, generic/470 was original designed to verify > > mmap(MAP_SYNC) on the dm-log-writes device enabling DAX. Due to the > > reason, we need to ensure that all underlying devices under > > dm-log-writes device support DAX. However dm-thin device never supports > > DAX so > > running generic/470 with dm-thin device always returns "not run". > > > > Please see the difference between old and new logic: > > > > old logic new logic > > --------------------------------------------------------------- > > log-writes device(DAX) log-writes device(DAX) > > | | > > PMEM0(DAX) + PMEM1(DAX) Thin device(non-DAX) + PMEM1(DAX) > > | > > PMEM0(DAX) > > --------------------------------------------------------------- > > > > We think dm-thin device is not a good solution for generic/470, is there > > any other solution to support both discard zero and DAX? > > Hi Brian, > > I have sent a patch[1] to revert your fix because I think it's not good for > generic/470 to use thin volume as my revert patch[1] describes: > [1] https://lore.kernel.org/fstests/20220914090625.32207-1-yangx.jy@fujitsu.com/T/#u > I think the history here is that generic/482 was changed over first in commit 65cc9a235919 ("generic/482: use thin volume as data device"), and then sometime later we realized generic/455,457,470 had the same general flaw and were switched over. The dm/dax compatibility thing was probably just an oversight, but I am a little curious about that because it should have been obvious that the change caused the test to no longer run. Did something change after that to trigger that change in behavior? > With the revert, generic/470 can always run successfully on my environment > so I wonder how to reproduce the out-of-order replay issue on XFS v5 > filesystem? > I don't quite recall the characteristics of the failures beyond that we were seeing spurious test failures with generic/482 that were due to essentially putting the fs/log back in time in a way that wasn't quite accurate due to the clearing by the logwrites tool not taking place. If you wanted to reproduce in order to revisit that, perhaps start with generic/482 and let it run in a loop for a while and see if it eventually triggers a failure/corruption..? > PS: I want to reproduce the issue and try to find a better solution to fix > it. > It's been a while since I looked at any of this tooling to semi-grok how it works. Perhaps it could learn to rely on something more explicit like zero range (instead of discard?) or fall back to manual zeroing? If the eventual solution is simple and low enough overhead, it might make some sense to replace the dmthin hack across the set of tests mentioned above. Brian > Best Regards, > Xiao Yang > > > > > BTW, only log-writes, stripe and linear support DAX for now. >