Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp988017iob; Fri, 13 May 2022 18:43:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcM0v7Q41jKioGf2xtmQBtuxa4cuhSDcnHmaFagnpafDrJra4OruCxhHyVUpdZ+QfYcS5s X-Received: by 2002:a1c:35c1:0:b0:38e:c4f6:1931 with SMTP id c184-20020a1c35c1000000b0038ec4f61931mr6800226wma.161.1652492615787; Fri, 13 May 2022 18:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652492615; cv=none; d=google.com; s=arc-20160816; b=UybENDtC/2xNL2d3umrpHDFdmU0P0kQIajzkMshxlf0n97tycOUsVkkAD4+y09q6jl xSeHR0UbWCVPxiA4LnLi5QUQF/CUZnf1bjEAyGJ+O3qxIy5FUtevEcOL4U3x3OnsUZUt iOFSUgP92ASr4MyCVnhgWQY3KHXtBTGkkNeVsHQFxlT5vui8J2aykdBn6edocYNHsAxz nJ2YPDLGX9QYZ2ZQ6l45IB6WrIojGguf29XahY8m7KM5zwLYuJuAGQsVsH//OFcvyxxy +gIY86JAkYyvKKfjD78yb6KMmnAziq1wmSLByv7QhXTI1LdCT1VLtgd08hYxjBxs4gks Fn1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=zoGgk2kWCSBtnI2kB77KiBaGWej6XbWC5/VEwo6RBHk=; b=YzEMuEd+EKmtoz3nhA5StvBCJAWt35oFa9PvCMS0p7WFkPs8y7KkYI8cpNoUL7ySOt uealF+c/wwNq/4fUtTYJhDJtTbWo+q2j8T1aqCSNnOUilTJ40e72MTu/XppjhT/N7Q4j qMeVtFpcaA8rwzsKh+OAsuDqqtw8DAz3hK49qyKmPoSc0dXCXeZHFJgIsFGyftbEfivH FXGU0YvrdcyjBSzYaCYE8sKB+oIuoXqd9dIf111Zwv8M0mRTOf9NmNcfqA4R/IRXDFUx 052cgwD8tdnkKSzmbx3oyetBYBUmXWUoje8NOvkpw8jBh+yQzYkTJRlo9frYmTIMI8lE 4Ldg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=UqYYm4C2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id m14-20020a5d6a0e000000b00203e9019643si3308306wru.967.2022.05.13.18.43.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 18:43:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20210112.gappssmtp.com header.s=20210112 header.b=UqYYm4C2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 2C79442FD59; Fri, 13 May 2022 17:09:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229713AbiEKPrG (ORCPT + 99 others); Wed, 11 May 2022 11:47:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239299AbiEKPrE (ORCPT ); Wed, 11 May 2022 11:47:04 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EF0444A05 for ; Wed, 11 May 2022 08:47:02 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id iq10so2649138pjb.0 for ; Wed, 11 May 2022 08:47:02 -0700 (PDT) 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; bh=zoGgk2kWCSBtnI2kB77KiBaGWej6XbWC5/VEwo6RBHk=; b=UqYYm4C2fW4mDDQmf6XLxKC/brLgrS9dhVDWviBXTaq7FGn78m3bKsJeMNJHx2wk3+ rULMOiRS+P0ZWx8dLnN2gYJeg71wDglfQFgm5wJHMj2qg5/Je0FPLtro+JJ6iV9Lob+J IfdmTH9vDGh3EOK9znhgho9UvGmGaFbGdjwMUbVl29Q5hQzDGDMzzgme//fpmJKfSdEI SgE4NoSwVXXKTDiY9+FrBKb4FfRMkGv3/Z2uTE8/r0rYGZMyexdZWg0vAeis9xPQ/jRV 7K3vxdq6GuFpZBRpOMVOPe+7txqriPUqd25KBoLnRqz1lSlh2qUpWn2idi6g4DJR4Bsb UR7w== 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; bh=zoGgk2kWCSBtnI2kB77KiBaGWej6XbWC5/VEwo6RBHk=; b=7sSG5BOtNrZjBA4sx+OK8yAcT2GF0+Hq9t9Z5d0m1whpcQeVIzGpt7QkPbnMZeiYia 51nbW6OAHFpKyEyPrxe4WEU6o5cBX9pm/p564ivHktypJ1E0WPmv1EWzJ4z1oiddmQei ss0yA5TRcTZVeiGe9ldO76ornTJ3Ml30fXocCpubN249/3w4V6pMqccF4lXf4wezGr+U zcjI1VHEvn7kL0DrjtMzgnqzen48CIIMXBJEQE8Er+7X1YcXVxEblD1VOdT8YJI6TfeZ tAfQEXZi1mHTy3lxK2NTWCid4nTLgaRXEZEX2GxTR5d6/kPWdXJqD158dmkug2X4+CuH fWfg== X-Gm-Message-State: AOAM530l6YAYf/1QHFvyjz7ohK0B6AIVHD0HTzEx6NQfxGtaYbDFJppE QYvnVL1ELMtrMm0MAcSUhHiJXMs6ELFXDDX5wlJ0BQ== X-Received: by 2002:a17:90b:4c85:b0:1dc:5778:5344 with SMTP id my5-20020a17090b4c8500b001dc57785344mr6055143pjb.8.1652284021808; Wed, 11 May 2022 08:47:01 -0700 (PDT) MIME-Version: 1.0 References: <20220508143620.1775214-1-ruansy.fnst@fujitsu.com> <20220511000352.GY27195@magnolia> <20220511014818.GE1098723@dread.disaster.area> <20220510192853.410ea7587f04694038cd01de@linux-foundation.org> <20220511024301.GD27195@magnolia> <20220510222428.0cc8a50bd007474c97b050b2@linux-foundation.org> <20220511151955.GC27212@magnolia> In-Reply-To: <20220511151955.GC27212@magnolia> From: Dan Williams Date: Wed, 11 May 2022 08:46:50 -0700 Message-ID: Subject: Re: [PATCHSETS] v14 fsdax-rmap + v11 fsdax-reflink To: "Darrick J. Wong" Cc: Andrew Morton , Dave Chinner , Shiyang Ruan , Linux Kernel Mailing List , linux-xfs , Linux NVDIMM , Linux MM , linux-fsdevel , Christoph Hellwig , Jane Chu , Goldwyn Rodrigues , Al Viro , Matthew Wilcox , Naoya Horiguchi , linmiaohe@huawei.com Content-Type: text/plain; charset="UTF-8" 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 Wed, May 11, 2022 at 8:21 AM Darrick J. Wong wrote: > > Oan Tue, May 10, 2022 at 10:24:28PM -0700, Andrew Morton wrote: > > On Tue, 10 May 2022 19:43:01 -0700 "Darrick J. Wong" wrote: > > > > > On Tue, May 10, 2022 at 07:28:53PM -0700, Andrew Morton wrote: > > > > On Tue, 10 May 2022 18:55:50 -0700 Dan Williams wrote: > > > > > > > > > > It'll need to be a stable branch somewhere, but I don't think it > > > > > > really matters where al long as it's merged into the xfs for-next > > > > > > tree so it gets filesystem test coverage... > > > > > > > > > > So how about let the notify_failure() bits go through -mm this cycle, > > > > > if Andrew will have it, and then the reflnk work has a clean v5.19-rc1 > > > > > baseline to build from? > > > > > > > > What are we referring to here? I think a minimal thing would be the > > > > memremap.h and memory-failure.c changes from > > > > https://lkml.kernel.org/r/20220508143620.1775214-4-ruansy.fnst@fujitsu.com ? > > > > > > > > Sure, I can scoot that into 5.19-rc1 if you think that's best. It > > > > would probably be straining things to slip it into 5.19. > > > > > > > > The use of EOPNOTSUPP is a bit suspect, btw. It *sounds* like the > > > > right thing, but it's a networking errno. I suppose livable with if it > > > > never escapes the kernel, but if it can get back to userspace then a > > > > user would be justified in wondering how the heck a filesystem > > > > operation generated a networking errno? > > > > > > most filesystems return EOPNOTSUPP rather enthusiastically when > > > they don't know how to do something... > > > > Can it propagate back to userspace? > > AFAICT, the new code falls back to the current (mf_generic_kill_procs) > failure code if the filesystem doesn't provide a ->memory_failure > function or if it returns -EOPNOSUPP. mf_generic_kill_procs can also > return -EOPNOTSUPP, but all the memory_failure() callers (madvise, etc.) > convert that to 0 before returning it to userspace. > > I suppose the weirder question is going to be what happens when madvise > starts returning filesystem errors like EIO or EFSCORRUPTED when pmem > loses half its brains and even the fs can't deal with it. Even then that notification is not in a system call context so it would still result in a SIGBUS notification not a EOPNOTSUPP return code. The only potential gap I see are what are the possible error codes that MADV_SOFT_OFFLINE might see? The man page is silent on soft offline failure codes. Shiyang, that's something to check / update if necessary.