Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1243739pxb; Fri, 21 Jan 2022 13:12:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJyx/4rLKphKk7VSpsjOVeEnyVIQQpUpgxE49/eu7mXUI5ZUOKHiodxfdtP8+oU+SUS4XMtA X-Received: by 2002:a17:90a:5d16:: with SMTP id s22mr2423388pji.81.1642799528719; Fri, 21 Jan 2022 13:12:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642799528; cv=none; d=google.com; s=arc-20160816; b=Ujr94lhi3t7wEARA9CqzfqRvhW+pC6kIE+eaceRUIWMXbQxHkYzuwdCSrmcUN5PDdo FZ3FxLhherQA50p29JKzWSTA8GXigWkKdWXK06J6CjKqz9N1fRI2I1ZIA7+F91qTv4UT sKZwqQZ3DAfjq9JfWBqsyc4QaZXCiPCYmmTuutGnBWf7Qy1Cc4WWDzc/5NXhzEGq+Y+J VfG29bM1JJx6aMENXeJCyHK3/Jnf5iZe1HvDhsq4YX54h1JRQ3AGv1upxVVa5tkTs008 K7YyGa6Lm6mrIGhR2LtejVzfcORdl0DdXIDODnCtR+nJoFGeYuslcYGn3rK9XKdbL/wC lGfQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=x4NWNJFPfdMZ6dsxs51T9yAg2PQobfgRFikQN4MZqzY=; b=LmP7s36tlICZL+qX+EUgkGXg2L5g5m8aEf7eHVZ6OoQkTuPy4Av7VmurGxscqVULWv ELI846Z3pPDtc4MBgP+7EuH69LPtDKqNkhx8ic+t/dIQo7eWrYsoAtGfR5ONq7kTfWVO yfcwX6+7W5QD6sqpW9GiSsBwWExxqvfDJCmwhAJ5yzg6E0uYda/KWT39mRBR1kL3S4Ds kZtsa9+HDbmgpUdibh36vTJKIxo2FPVRlrefrhxjr4kLuCBTowGx9/moXFMXOjHY+s72 6EZew5dw+0KQFEx+3gorH/2e1nffV95KSf5xhmaAcAPG5Q6/O10L1XHoQiWTif92nvza yUhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=FHhtYapI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c7si7167058pgq.295.2022.01.21.13.11.56; Fri, 21 Jan 2022 13:12:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=FHhtYapI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1359529AbiATI7Q (ORCPT + 99 others); Thu, 20 Jan 2022 03:59:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359412AbiATI7N (ORCPT ); Thu, 20 Jan 2022 03:59:13 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36F20C061748; Thu, 20 Jan 2022 00:59:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=x4NWNJFPfdMZ6dsxs51T9yAg2PQobfgRFikQN4MZqzY=; b=FHhtYapIjaAV9Yu0e8p4as5cUI aLvqiavV/GyFE1ELMqo1eVzTacOs46MHeUg4nb2Mm9oQQ1E4itDmuqNTNgeB78SqXGjFRpiByAjEg oxiZOaaVVcXizkwYRFTDzlEFqekvTPbIYz9CYKGt9mC3gqNzcTdWk7GzZjkg48Ej9jmzFJADmE+d0 k8AkTCFAvI6yiIeDiOqW5Iw5P5mOJK99ga86NjtQWHg2h7ZX9hKoL0jKWewNBECzWIrz60+X698sa Ey+kFJZygvziErE+CbCiPZS7GtDtUc86AopRC0sIsNWyjm3lvCHOBbUyD606ZJ46pd/Rtp0Qta0Fw fAfkSUYQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nATHk-009z93-IJ; Thu, 20 Jan 2022 08:59:12 +0000 Date: Thu, 20 Jan 2022 00:59:12 -0800 From: Christoph Hellwig To: Shiyang Ruan Cc: linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, djwong@kernel.org, dan.j.williams@intel.com, david@fromorbit.com, hch@infradead.org, jane.chu@oracle.com Subject: Re: [PATCH v9 10/10] fsdax: set a CoW flag when associate reflink mappings Message-ID: References: <20211226143439.3985960-1-ruansy.fnst@fujitsu.com> <20211226143439.3985960-11-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211226143439.3985960-11-ruansy.fnst@fujitsu.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Dec 26, 2021 at 10:34:39PM +0800, Shiyang Ruan wrote: > +#define FS_DAX_MAPPING_COW 1UL > + > +#define MAPPING_SET_COW(m) (m = (struct address_space *)FS_DAX_MAPPING_COW) > +#define MAPPING_TEST_COW(m) (((unsigned long)m & FS_DAX_MAPPING_COW) == \ > + FS_DAX_MAPPING_COW) These really should be inline functions and probably use lower case names. But different question, how does this not conflict with: #define PAGE_MAPPING_ANON 0x1 in page-flags.h? Either way I think this flag should move to page-flags.h and be integrated with the PAGE_MAPPING_FLAGS infrastucture.