Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1367467pxb; Fri, 21 Jan 2022 16:41:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwd5cHubc7svHYJHfpCnoq6rCa8YQEIRlW0Aul/+hp/iXa99j62JeRgQomUihT5aeolopcB X-Received: by 2002:a17:90b:3148:: with SMTP id ip8mr3019932pjb.61.1642812078002; Fri, 21 Jan 2022 16:41:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642812077; cv=none; d=google.com; s=arc-20160816; b=0kLc2ERafBkkrntrjkh2YEb9VLDhCLsP6ij/Zgpje8zgTAWtMuJhJIdgUI8kN+ISrm xfV2jMPy3KsSucUGFxPr59cU1wj+i2LK0bZ+sKbsshoWSKcrvkBUMvfHbYGyP2fTLB4W pTPtZ2qekW2wFFqq9pkrdWsW+R7+OHoHKFU316oYn7RXRsSV5Ss60Q4ZCUhlnBzN46jX +nYqcxfILJ5eiZGjofYBzNF7MbKCDslhhHYrT6YRMz75xDboFcC4CflxQDryPO5RgWIZ tq0490wGaN9lBvX0+aRyv6IlxuhBj29023Yl2Ps3+0XmF1ymGcNktru9gTD5ijX6zh62 Y1wQ== 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=pZizXuMD1J5BE9mE+cKlDQJcR34yImVavkkZLYngZw4=; b=wHY8fIvLAzVltXnDddE7I07SbNNzlZxn2Gfo8hEEXoCLWPjVSlXkOtcKqu9F1PsJRb Pvnu/PYr3jSlNe7sxmz/WDMPWvY7dWmFvryRedB68LxPSbteHDdukM+uGmUwHro1/GE+ MfK6IJdYgatgUzYRxo5nVbNK5sEHdiSCxKtjvvsoV4iRyOmE5h6cZtYEvyp0KIZgwGE1 9EC0MK9yZG6L20vtTAsyibRSaehEH28lp2JpqGMXNZoAeKbanOnsMvOk5Dhu1xvz5Ehn qUuqo4AC8x4hRFOt27eI+UilCsiNBM3SP2KOeddhMndvDk+JW9FvCEyykvTZ6WUd6bOf l15A== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w7si7856153plg.323.2022.01.21.16.41.06; Fri, 21 Jan 2022 16:41:17 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234148AbiAUIfF (ORCPT + 99 others); Fri, 21 Jan 2022 03:35:05 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:2637 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234198AbiAUIeV (ORCPT ); Fri, 21 Jan 2022 03:34:21 -0500 IronPort-Data: =?us-ascii?q?A9a23=3ATGEFKqh5CkSoF7MEZqgz4YuZX161CxEKZh0ujC4?= =?us-ascii?q?5NGQNrF6WrkUAy2YXUD+ObvyMZzCmLot/bojn9h8Av8XTnIJkHgtqqnw8FHgiR?= =?us-ascii?q?ejtX4rAdhiqV8+xwmwvdGo+toNGLICowPkcFhcwnT/wdOixxZVA/fvQHOCkUbS?= =?us-ascii?q?dYnkZqTJME0/NtzoywobVvaY42bBVMyvV0T/Di5W31G2NglaYAUpIg063ky6Di?= =?us-ascii?q?dyp0N8uUvPSUtgQ1LPWvyF94JvyvshdJVOgKmVfNrbSq+ouUNiEEm3lExcFUrt?= =?us-ascii?q?Jk57wdAsEX7zTIROTzHFRXsBOgDAb/mprjPl9b6FaNC+7iB3Q9zx14M9QvJqrW?= =?us-ascii?q?EEnOLbQsOoAURhECDw4NqpDkFPCCSHl6ZLNlhKaKhMAxN0rVinaJ7Yw9u9pAG1?= =?us-ascii?q?m++YfLTcXZBGfwemxxdqTSuJsrsUlItPiMI4Wtjdn1z6xJfovR9bBBbrL4dtZ1?= =?us-ascii?q?TIrrsFIAfvaIcEebFJHYBbfZBtAElQaEpQzmKGvnHaXWzlZrk+F4K8yy2vNxQd?= =?us-ascii?q?ylr/3P7L9fMKGRMBQtkKZvX7duWD4BAwKctCS11Kt8Huqi6nEnT7TX5gbH7m1s?= =?us-ascii?q?PVthTW7wm0VFQ1TW0C3rOe0jmagVN9FbU8Z4Cwjqe417kPDZt38WQCo5X2JpBg?= =?us-ascii?q?RX/JOHOAgrgKA0KzZ50CeHGdsZjpAbsE28d84XhQ02VKT2dDkHzpitPuSU331y?= =?us-ascii?q?1s+hVteIgBMdSlbO3BCFlBDvrHeTEgIpkqnZr5e/GSd17UZwQ3N/g0=3D?= IronPort-HdrOrdr: =?us-ascii?q?A9a23=3AmS58S6/PRHT7JJgFU+puk+C9I+orL9Y04lQ7?= =?us-ascii?q?vn2ZKCY0TiX2ra2TdZggvyMc6wxxZJhDo7+90cC7KBu2yXcc2/hzAV7IZmXbUQ?= =?us-ascii?q?WTQr1f0Q=3D=3D?= X-IronPort-AV: E=Sophos;i="5.88,304,1635177600"; d="scan'208";a="120661741" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 21 Jan 2022 16:34:20 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id 10D3A4D15A58; Fri, 21 Jan 2022 16:34:19 +0800 (CST) Received: from G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.85) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Fri, 21 Jan 2022 16:34:19 +0800 Received: from [192.168.22.28] (10.167.225.141) by G08CNEXCHPEKD09.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.23 via Frontend Transport; Fri, 21 Jan 2022 16:34:16 +0800 Message-ID: Date: Fri, 21 Jan 2022 16:34:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH v9 10/10] fsdax: set a CoW flag when associate reflink mappings To: Christoph Hellwig CC: , , , , , , , , References: <20211226143439.3985960-1-ruansy.fnst@fujitsu.com> <20211226143439.3985960-11-ruansy.fnst@fujitsu.com> <70a24c20-d7ee-064c-e863-9f012422a2f5@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: 10D3A4D15A58.A4165 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com X-Spam-Status: No Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2022/1/21 15:16, Christoph Hellwig 写道: > On Fri, Jan 21, 2022 at 10:33:58AM +0800, Shiyang Ruan wrote: >>> >>> But different question, how does this not conflict with: >>> >>> #define PAGE_MAPPING_ANON 0x1 >>> >>> in page-flags.h? >> >> Now we are treating dax pages, so I think its flags should be different from >> normal page. In another word, PAGE_MAPPING_ANON is a flag of rmap mechanism >> for normal page, it doesn't work for dax page. And now, we have dax rmap >> for dax page. So, I think this two kinds of flags are supposed to be used >> in different mechanisms and won't conflect. > > It just needs someone to use folio_test_anon in a place where a DAX > folio can be passed. This probably should not happen, but we need to > clearly document that. > >>> Either way I think this flag should move to page-flags.h and be >>> integrated with the PAGE_MAPPING_FLAGS infrastucture. >> >> And that's why I keep them in this dax.c file. > > But that does not integrate it with the infrastructure. For people > to debug things it needs to be next to PAGE_MAPPING_ANON and have > documentation explaining why they are exclusive. Ok, understood. -- Thanks, Ruan.