Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp597831pxb; Tue, 15 Feb 2022 23:17:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJwmIXBsTjw+bon/jTnTTdXQz5tBB94ht94wjREAT3xFEsDmPEho6R7mAvhJ/8/DCc8cpZHS X-Received: by 2002:a05:6a00:174e:b0:4e1:7cfb:7a26 with SMTP id j14-20020a056a00174e00b004e17cfb7a26mr1607246pfc.50.1644995872098; Tue, 15 Feb 2022 23:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644995872; cv=none; d=google.com; s=arc-20160816; b=r4Y3dW9HytCLBHIim6Fea5QyzkVQexdjnE3uhb+lc8Y7mubxoqpYTt5Pv9nU1nT5Wd 5+k0KAnP09ypK584jBkwVOm376rfnijvbeVMGimn/NOAMpdDZ0p5jyuAE0fdbTs7ga0f NNPoi5k6u2SQo2npBUnldTsJT/eByg14HBvt2F8ba7hZHcDNDrg8SyL2jSgwMm/kSSeH DIMC7GBhQ4GRTZnXaKc6bO2jMs3uQiz7kZN2ZGoimgK6BYPVM4hbMWfUfDR2yY8aXEar 3QiOmRto+pADUU2Uo2MSqVzPxjHbKsUjUd/H9CJGGVOxhawFLpCM6/jT5YZYfYCoCtyt a08g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=P9/Lk8R9pgWnqbRmfZpLv8rIV8QLRWoWxnW3fVXtRwE=; b=jAV2nohJcBEg20hrA5jFWBlargxDyrzjYYbe3dhd9jcAK8rQ40g2pEXX8qoaTWN+gP WwwDQVKckCHswokA9OZJFo1jResKli+tOelPvSNWV6hDhHqSmZEgByIzUwc2D8b+x2hh jFwfuhUMknIZ7eR8CzxvM4xjx8c5wx+Mr84PwvV3k6kbPsq048yIc/O2X8Glumd1RyOv 9JVS5eKipzQ3tJ4lJeRHJiM2GnIeJFdb5mPckUwK6KwWp9H81PBlTEO5W63QHgVvqfMr vOzvXX3zZdSGqbkAwgkXSToN/fT8vvaFcQ5we3DbthwGkqk5LIPg71gqKM3BhaGFgPob ZE6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=RjnWgBK3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r22si4312560pls.198.2022.02.15.23.17.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 23:17:52 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=RjnWgBK3; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1DC91212E15; Tue, 15 Feb 2022 22:49:25 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344041AbiBPDHs (ORCPT + 99 others); Tue, 15 Feb 2022 22:07:48 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241174AbiBPDHq (ORCPT ); Tue, 15 Feb 2022 22:07:46 -0500 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A8B78BF66 for ; Tue, 15 Feb 2022 19:07:35 -0800 (PST) Received: by mail-pg1-x529.google.com with SMTP id p23so947440pgj.2 for ; Tue, 15 Feb 2022 19:07:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=P9/Lk8R9pgWnqbRmfZpLv8rIV8QLRWoWxnW3fVXtRwE=; b=RjnWgBK3XxvHo1Ay307j23W4JXT8TQPb6hFj1WWQgILnQS7eNKyQJMgEQ6MLGRjAzj cpqvAdt+bRfmKxd2DMH2g0nEh4hNCtehFduXIxofrgjg6XoPyqie6JVJuGc1MwQ5FkKI vmmOSY3GV3EVOA3OvdM8QxeOACAgAA4LGqIKnt+1GSczjtHj0DbM4sVL5lw7x7wHBwqx aMLJxUTbyj4KVMLw1zlUpdMjfp7ja2OO7yQ/Jy282kLaAMeBRPnvRuX3YD8ossHmvqj6 LEo8NXJTAA3SH1oXxW8qlPplpv+ntEO9ZTnRtiKwaCep2YtJRw9ai5tMBqHpb+EaQDGy D3xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=P9/Lk8R9pgWnqbRmfZpLv8rIV8QLRWoWxnW3fVXtRwE=; b=eVB0vRyr6vGRmJLEWXvVhKo4DLoAp7UZd5tYWYv2WIxBv9vVAgWuLMsWKpwJxrYM4T lg2ztooNjlk6VtpjXqg9z4gGtGkiJk4xslz2uDEle0GHft7bmGCIuSivl4QVFPLou/+2 ORpJcpD+OZMxIGPJXD6oqaUR96JnG7i21DiFj42fgNy3uafQHt9ZyRew5EAsCcugOUIX GjZIbbxXwi76Itgq4Rbl24+RxLszLaoxDHU5pTd0TNCjb8aQco028LuG6KuvBxC8phbE jG+Y9JX4Vj8jxRmMEtu6YbcZFvHBUgZ9pzFx68TmqLuFX/RFdXZMj8fIS1fNq1R3RhOY JJBA== X-Gm-Message-State: AOAM5334nJcmNu9JYAMRDG7vjFd/IfV2kH5aC3OSSy5jFQvN9EYO35wV SKNZ/GQo9mjyPzVADKYS3z+bXjImpkodCanIHXFQdQ== X-Received: by 2002:a05:6a00:b4e:b0:4e1:9986:a5b6 with SMTP id p14-20020a056a000b4e00b004e19986a5b6mr139822pfo.61.1644980854632; Tue, 15 Feb 2022 19:07:34 -0800 (PST) MIME-Version: 1.0 References: <20220127124058.1172422-1-ruansy.fnst@fujitsu.com> <20220127124058.1172422-6-ruansy.fnst@fujitsu.com> <905fd72a-d551-4623-f448-89010b752d0e@fujitsu.com> In-Reply-To: <905fd72a-d551-4623-f448-89010b752d0e@fujitsu.com> From: Dan Williams Date: Tue, 15 Feb 2022 19:07:23 -0800 Message-ID: Subject: Re: [PATCH v10 5/9] fsdax: Introduce dax_load_page() To: Shiyang Ruan Cc: Linux Kernel Mailing List , linux-xfs , Linux NVDIMM , Linux MM , linux-fsdevel , "Darrick J. Wong" , david , Christoph Hellwig , Jane Chu , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Tue, Feb 15, 2022 at 7:02 PM Shiyang Ruan wrot= e: > > > > =E5=9C=A8 2022/2/16 9:34, Dan Williams =E5=86=99=E9=81=93: > > On Thu, Jan 27, 2022 at 4:41 AM Shiyang Ruan = wrote: > >> > >> The current dax_lock_page() locks dax entry by obtaining mapping and > >> index in page. To support 1-to-N RMAP in NVDIMM, we need a new functi= on > >> to lock a specific dax entry > > > > I do not see a call to dax_lock_entry() in this function, what keeps > > this lookup valid after xas_unlock_irq()? > > I am not sure if I understood your advice correctly: You said > dax_lock_entry() is not necessary in v9[1]. So, I deleted it. > > [1]: > https://lore.kernel.org/linux-xfs/CAPcyv4jVDfpHb1DCW+NLXH2YBgLghCVy8o6wrc= 02CXx4g-Bv7Q@mail.gmail.com/ I also said, "if the filesystem can make those guarantees" it was not clear whether this helper is being called back from an FS context that guarantees those associations or not. As far as I can see there is nothing that protects that association. Apologies for the confusion, I was misunderstanding where the protection was being enforced in this case.