Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1286630iog; Thu, 30 Jun 2022 22:40:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sHhw7YpFI8nDzSGWXgomkgZdFCSVu1z1tEbNqeSt/8ov+moF/UknUpVRTe88qnRO2sY0H6 X-Received: by 2002:aa7:d88a:0:b0:435:6abb:1284 with SMTP id u10-20020aa7d88a000000b004356abb1284mr16634159edq.353.1656654048214; Thu, 30 Jun 2022 22:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656654048; cv=none; d=google.com; s=arc-20160816; b=DGq7UFnqp5qWOrDVaufM54ldnAqCrc9kVo64Pd6yvdg9ANYJMEYB7fmBW6AXv9cX9c SgMVarq4z3QQmbx4sDzFa0sBc1yckqRXk3Thsqgu/WSpiqUPxCKtkJyXt07FNYv9jTuC +g5nKEUYTXf+RAyKWn+y69wSlsjk76xhdFCBJ4oD8wlXrib7KHj2mkMdFUtALSWoWBn2 yPYiyXWOn1DQZlm/1cj4xQFQjQosJw6OIlzOa9LP81AGL6jX1AkqmGgn/UNNQRdzyHUK soFGGi48UmwbgRl3kziAhqYP5BtmCJdeewCiAxEwivxOLKZ/yICAS5Bp3mn262WVK2+i RPeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id :ironport-hdrordr:ironport-data; bh=AcsVGaN5flnq/67ktHdAP+bzZ7wlptWLzWRNqAKRPh4=; b=w7wv6Cfe/RFsTLJGi6P9dtEdGrI6MuyVso99yjJMykKIUqc0AU13g8XCgnedaxaGYx 9WoKZGsdVyUDOWBY4Ctj2xIHoRm/XPPDA2cl6PZ7JHUOEEF/3MZS7ziH2197wnPdGX5z VV6EdA7u6ZyZ39Xx0L7QWp8lViiylLnbfDrbaYaZtt4nlGVPSK1qd0RI0rrn5/i7K4A6 9+ePLoALWwV8JA8xfMyOeLMHRyT6modTTA0NgRzm6r1FrGHBuIH1RzQYAgY0vUBZ/sMy Hd/fph1cVC968PXPMLk/atvD/EnEpGDTKECKDTmyXW/3jwK+sIt5YYAVMqYqcFct7laA 4S+Q== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m17-20020a170906721100b0070d8de4e431si1443085ejk.206.2022.06.30.22.40.20; Thu, 30 Jun 2022 22:40:48 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233541AbiGAFO6 (ORCPT + 99 others); Fri, 1 Jul 2022 01:14:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229650AbiGAFOz (ORCPT ); Fri, 1 Jul 2022 01:14:55 -0400 Received: from heian.cn.fujitsu.com (mail.cn.fujitsu.com [183.91.158.132]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C2BD6677EE; Thu, 30 Jun 2022 22:14:53 -0700 (PDT) IronPort-Data: =?us-ascii?q?A9a23=3AJLjYGq6B6cmXTrRbn3QZXwxRtJbFchMFZxGqfqr?= =?us-ascii?q?LsXjdYENS12RVy2McX2/UPKnYZzPxKohxPorjpB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Ce2RsEFxNjqI1SiVT4rw=3D=3D?= X-IronPort-AV: E=Sophos;i="5.88,333,1635177600"; d="scan'208";a="127096438" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 01 Jul 2022 13:14:52 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id B88394D1719A; Fri, 1 Jul 2022 13:14:51 +0800 (CST) Received: from G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.80) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 1 Jul 2022 13:14:50 +0800 Received: from [192.168.22.78] (10.167.225.141) by G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Fri, 1 Jul 2022 13:14:53 +0800 Message-ID: <07805923-6455-e046-8c0a-60ed99d1fb38@fujitsu.com> Date: Fri, 1 Jul 2022 13:14:51 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH] xfs: fail dax mount if reflink is enabled on a partition To: "Darrick J. Wong" CC: , , , , , References: <20220609143435.393724-1-ruansy.fnst@fujitsu.com> From: Shiyang Ruan In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-yoursite-MailScanner-ID: B88394D1719A.AFAA7 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,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 在 2022/7/1 8:31, Darrick J. Wong 写道: > On Thu, Jun 09, 2022 at 10:34:35PM +0800, Shiyang Ruan wrote: >> Failure notification is not supported on partitions. So, when we mount >> a reflink enabled xfs on a partition with dax option, let it fail with >> -EINVAL code. >> >> Signed-off-by: Shiyang Ruan > > Looks good to me, though I think this patch applies to ... wherever all > those rmap+reflink+dax patches went. I think that's akpm's tree, right? Yes, they are in his tree, still in mm-unstable now. > > Ideally this would go in through there to keep the pieces together, but > I don't mind tossing this in at the end of the 5.20 merge window if akpm > is unwilling. Both are fine to me. Thanks! -- Ruan. > > Reviewed-by: Darrick J. Wong > > --D > >> --- >> fs/xfs/xfs_super.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c >> index 8495ef076ffc..a3c221841fa6 100644 >> --- a/fs/xfs/xfs_super.c >> +++ b/fs/xfs/xfs_super.c >> @@ -348,8 +348,10 @@ xfs_setup_dax_always( >> goto disable_dax; >> } >> >> - if (xfs_has_reflink(mp)) { >> - xfs_alert(mp, "DAX and reflink cannot be used together!"); >> + if (xfs_has_reflink(mp) && >> + bdev_is_partition(mp->m_ddev_targp->bt_bdev)) { >> + xfs_alert(mp, >> + "DAX and reflink cannot work with multi-partitions!"); >> return -EINVAL; >> } >> >> -- >> 2.36.1 >> >> >>