Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1939390rwn; Fri, 9 Sep 2022 06:25:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR4XS9CXORRPLem5QdABe1jtxlXjwnMjr3q4k0ZGripZ4fIUwKcdxHHFzqfVmlUB00KRW6Xa X-Received: by 2002:a05:6402:5409:b0:44f:1e05:1e8 with SMTP id ev9-20020a056402540900b0044f1e0501e8mr10130896edb.373.1662729957051; Fri, 09 Sep 2022 06:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662729957; cv=none; d=google.com; s=arc-20160816; b=kejkLDXj33Mj0WxfZ0eGWoVaj2/YnOjvhLh1R9A0ZPqbHJZceTfbJR0bJ+oD8meR3p vxSCs5CcyaXotLgDtNPhqW81xaVufgoBGCe8K9Sel+fHmVG4RB2KLIEFbMvBhon+liYz Vmunos9BJ18xsZBt532zoPSaxak6OeQrlMq+EGJ1UYi/ZPLn8suIA0/YothqxkCFGFfX hFCUjkfJedIyasXQf640pDsEaeRIXcZUPLd7vryF4WaT5tJHzpoTc7N/qlgFUuBy1gpm FfA4APZ4eajrRZajm1J68eZq4vIRBUGcTS+Ws7t2PjWoqKQtlTtCGu5AAl7SXAl0Y+Vm MfCw== 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=7roVqgiLTtD9K+hJlFUdG9Wb1smDN31yGHEloDLRN0o=; b=aRLCu8ZetSz4ukwVTlN3SfDAPB++Gj4t71tpOvAgRRsDoZ7I1FeAbtDD6sRhogx17O tLfCHPvKmwB4tdD09LOYYWjzhkQZXJFQ4pHt4a/Rg/XeQLSMFIUSVqCmTuMiVqnV7noD 5NQEzpHE/eISN8xYmG2A2i4LoHbCwiiVtbDv0qNjslZFH5jLYb6qP4NcQk1YkRlOAESp FUuEqWqWSSjXpXp6S0DIkFM+4Dv0bZpbI2oLIgm+vUXc+8kRVg2bc3r6DitjoWO+RdrD z01MogHiWwwHfnm/YorV9ysU2PTQftX7jUMUyZGqEkatcUMsZSX8d4BGBYobbHDzLL4n hKeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TswIDIgL; 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 jo1-20020a170906f6c100b0073d7ad9607bsi383149ejb.551.2022.09.09.06.25.30; Fri, 09 Sep 2022 06:25:57 -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=TswIDIgL; 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 S229881AbiIINBh (ORCPT + 99 others); Fri, 9 Sep 2022 09:01:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229707AbiIINBf (ORCPT ); Fri, 9 Sep 2022 09:01:35 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A2A3CCD78 for ; Fri, 9 Sep 2022 06:01:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662728493; 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=7roVqgiLTtD9K+hJlFUdG9Wb1smDN31yGHEloDLRN0o=; b=TswIDIgLz+yNZk7RdTzkXhGOchJqmSPMZCcnBS/npq80Rvd9uGLIt2kObNbBvV6zW7H+WC Ib2YExifaxGgnIpeTDHg5ma3FBvV3jjreLSMclsDmgAzq3SXqizeXUZQYAXnDN0VruV2rH rSwoqSjwyU1JG9zOxL7/OZ8brpsswcY= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-383--9eQCcBuPnWPdQSGTXIHoA-1; Fri, 09 Sep 2022 09:01:31 -0400 X-MC-Unique: -9eQCcBuPnWPdQSGTXIHoA-1 Received: by mail-qt1-f198.google.com with SMTP id fx6-20020a05622a4ac600b0035a70ba1cbcso1429342qtb.21 for ; Fri, 09 Sep 2022 06:01:30 -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=7roVqgiLTtD9K+hJlFUdG9Wb1smDN31yGHEloDLRN0o=; b=z5hobx2NXu76rppAkgHJcRXhqofHzf3RmKxfnTuX9j5EIyGnL5LZ36jBWs0IoVk43o LZqjnxE6fDqI+eVICM6XjdkUTT+r5e9khbq81lJlZGpMew5rG4DLhSH3Qa+kovW8QG4R HqEAmO6S87EVjm6vFC72tdVoaBuC82fHW7UK7UNhqussdSuRvu5sroVTkgU9FoQp2Wcx 8j7dytnJU5/4s6QV1moUBjJokbY2Ntzn7FZbqF6rQjjRNXG5xApc14NX3CMZjs1pZttP W5A+ecNmTx9XhzaVYrjL6k0iRAqnRf4HOFq6EfUVmse6R4HQT3ojOXKHgYL7CejLk+hE 5jUw== X-Gm-Message-State: ACgBeo1drqBgIWucd1xrsIAj8agoz26xJ1RtZwjc645YHZ2vuinYXBA4 1FK+HSX1f5NnDXfbquYbYLlpYzAmVfADM9+P4oKNYqbSSrlOEMkjskpmEojAsDaZvuMx611QUTA j7tUpCBK2p8Y/4567JD/GEGBz X-Received: by 2002:a0c:e103:0:b0:4aa:b54b:e396 with SMTP id w3-20020a0ce103000000b004aab54be396mr11039016qvk.42.1662728490188; Fri, 09 Sep 2022 06:01:30 -0700 (PDT) X-Received: by 2002:a0c:e103:0:b0:4aa:b54b:e396 with SMTP id w3-20020a0ce103000000b004aab54be396mr11038913qvk.42.1662728489147; Fri, 09 Sep 2022 06:01:29 -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 r8-20020ac87ee8000000b0034355a352d1sm306127qtc.92.2022.09.09.06.01.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 06:01:28 -0700 (PDT) Date: Fri, 9 Sep 2022 09:01:25 -0400 From: Brian Foster To: Shiyang Ruan Cc: "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" , =?utf-8?B?WWFuZywgWGlhby/mnagg5pmT?= Subject: Re: [PATCH] xfs: fail dax mount if reflink is enabled on a partition Message-ID: References: <20220609143435.393724-1-ruansy.fnst@fujitsu.com> <74b0a034-8c77-5136-3fbd-4affb841edcb@fujitsu.com> <7fde89dc-2e8f-967b-d342-eb334e80255c@fujitsu.com> <0ea1cbe1-79d7-c22b-58bf-5860a961b680@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 Thu, Sep 08, 2022 at 09:46:04PM +0800, Shiyang Ruan wrote: > > > 在 2022/8/4 8:51, Darrick J. Wong 写道: > > On Wed, Aug 03, 2022 at 06:47:24AM +0000, ruansy.fnst@fujitsu.com wrote: > > ... > > > > > > > > > > > > > > > BTW, since these patches (dax&reflink&rmap + THIS + pmem-unbind) are > > > > > > > waiting to be merged, is it time to think about "removing the > > > > > > > experimental tag" again? :) > > > > > > > > > > > > It's probably time to take up that question again. > > > > > > > > > > > > Yesterday I tried running generic/470 (aka the MAP_SYNC test) and it > > > > > > didn't succeed because it sets up dmlogwrites atop dmthinp atop pmem, > > > > > > and at least one of those dm layers no longer allows fsdax pass-through, > > > > > > so XFS silently turned mount -o dax into -o dax=never. :( > > > > > > > > > > Hi Darrick, > > > > > > > > > > I tried generic/470 but it didn't run: > > > > > [not run] Cannot use thin-pool devices on DAX capable block devices. > > > > > > > > > > Did you modify the _require_dm_target() in common/rc? I added thin-pool > > > > > to not to check dax capability: > > > > > > > > > > case $target in > > > > > stripe|linear|log-writes|thin-pool) # add thin-pool here > > > > > ;; > > > > > > > > > > then the case finally ran and it silently turned off dax as you said. > > > > > > > > > > Are the steps for reproduction correct? If so, I will continue to > > > > > investigate this problem. > > > > > > > > Ah, yes, I did add thin-pool to that case statement. Sorry I forgot to > > > > mention that. I suspect that the removal of dm support for pmem is > > > > going to force us to completely redesign this test. I can't really > > > > think of how, though, since there's no good way that I know of to gain a > > > > point-in-time snapshot of a pmem device. > > > > > > Hi Darrick, > > > > > > > removal of dm support for pmem > > > I think here we are saying about xfstest who removed the support, not > > > kernel? > > > > > > I found some xfstests commits: > > > fc7b3903894a6213c765d64df91847f4460336a2 # common/rc: add the restriction. > > > fc5870da485aec0f9196a0f2bed32f73f6b2c664 # generic/470: use thin-pool > > > > > > So, this case was never able to run since the second commit? (I didn't > > > notice the not run case. I thought it was expected to be not run.) > > > > > > And according to the first commit, the restriction was added because > > > some of dm devices don't support dax. So my understanding is: we should > > > redesign the case to make the it work, and firstly, we should add dax > > > support for dm devices in kernel. > > > > dm devices used to have fsdax support; I think Christoph is actively > > removing (or already has removed) all that support. > > > > > In addition, is there any other testcase has the same problem? so that > > > we can deal with them together. > > > > The last I checked, there aren't any that require MAP_SYNC or pmem aside > > from g/470 and the three poison notification tests that you sent a few > > days ago. > > > > --D > > > > Hi Darrick, Brian > > I made a little investigation on generic/470. > > This case was able to run before introducing thin-pool[1], but since that, > it became 'Failed'/'Not Run' because thin-pool does not support DAX. I have > checked the log of thin-pool, it never supports DAX. And, it's not someone > has removed the fsdax support. So, I think it's not correct to bypass the > requirement conditions by adding 'thin-pool' to _require_dm_target(). > > As far as I known, to prevent out-of-order replay of dm-log-write, thin-pool > was introduced (to provide discard zeroing). Should we solve the > 'out-of-order replay' issue instead of avoiding it by thin-pool? @Brian > 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. Brian > Besides, since it's not a fsdax problem, I think there is nothing need to be > fixed in fsdax. I'd like to help it solved, but I'm still wondering if we > could back to the original topic("Remove Experimental Tag") firstly? :) > > > [1] fc5870da485aec0f9196a0f2bed32f73f6b2c664 generic/470: use thin volume > for dmlogwrites target device > > > -- > Thanks, > Ruan. > >