Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp851885pxf; Wed, 24 Mar 2021 18:32:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZlXmfwviMGt58PxV1DE05kvaNUwBe9Drs66Wy55YlJYZdpcBXxfHK6QH0Vx5Gm0k+1Phc X-Received: by 2002:a17:906:1fd6:: with SMTP id e22mr6864258ejt.481.1616635926627; Wed, 24 Mar 2021 18:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616635926; cv=none; d=google.com; s=arc-20160816; b=E1Ca2ETKFXg2LIH2SC9gUbQc+T01n0pDtgcjUY9VYe2jFBBnvv3Tsqdh2p3jtWYvf3 Oh86yMoDaXFiSruigexR9tqNufUxsBI03yuD/vbhdJDKF2XKDBBRw2j+Pjv4sJEace/R w3xJW6hsUrzsq/0isVdPQt2s+sAmlCCF01J9sMJUfhsrb0NPFv+go0rwXI4VYimYhjnn 59vQbYUYs2E5dEuQfUy6R0ti/hod4aNf+y3AQvxgtEqVxMxtjkEktdWYXoaoZU1Me6xr AG8nUvvO2QSPHwTSGbbW3cll6Lo/iFG4DvJg+eHmSWulN/Yf2bysyrqNq/uS+1Pwm8Rb p+Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=RRjFM2m/fZ2S3GWuiCksQb+S+i7W63bwWidEtQc9QDU=; b=S80NVu2nJMJam+2kK9OBpO8IKaNML9qyHML/eaCywxVLwpdd5dQr7T6DC93x2m79EG cuMHS2s8trXGAht7LzU5K4fdeg1QOfK4/4fVsb/NL2tTGNPzcGDy3F6LzTAHoyp9vNSB OZ8MxAnoadxQ6VX////36qmZRGGBmMUzw8mOroFjN8DjRT3xs+tuw2lTcFI7urUSTEsB mwfLURL7O+sW00WqLwHFVxnN9Lduwpn1SdpIHkS71gEwlccAcWKwwvrwwP7hs9zUhV7z LlJ30twcON2xVohl4N9WQRkK4RC1AOqQxkwf0Dx8vnpEsd9NHpC1SSZxT1vcp9pTLaB6 UzQg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ga18si3056385ejb.632.2021.03.24.18.31.42; Wed, 24 Mar 2021 18:32:06 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232757AbhCXHsY (ORCPT + 99 others); Wed, 24 Mar 2021 03:48:24 -0400 Received: from verein.lst.de ([213.95.11.211]:35848 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231344AbhCXHry (ORCPT ); Wed, 24 Mar 2021 03:47:54 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 6BC6D68B02; Wed, 24 Mar 2021 08:47:51 +0100 (CET) Date: Wed, 24 Mar 2021 08:47:51 +0100 From: Christoph Hellwig To: Dan Williams Cc: "ruansy.fnst@fujitsu.com" , Linux Kernel Mailing List , linux-xfs , linux-nvdimm , Linux MM , linux-fsdevel , device-mapper development , "Darrick J. Wong" , david , Christoph Hellwig , Alasdair Kergon , Mike Snitzer , Goldwyn Rodrigues , "qi.fuli@fujitsu.com" , "y-goto@fujitsu.com" Subject: Re: [PATCH v3 01/11] pagemap: Introduce ->memory_failure() Message-ID: <20210324074751.GA1630@lst.de> References: <20210208105530.3072869-1-ruansy.fnst@cn.fujitsu.com> <20210208105530.3072869-2-ruansy.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 23, 2021 at 07:19:28PM -0700, Dan Williams wrote: > So I think the path forward is: > > - teach memory_failure() to allow for ranged failures > > - let interested drivers register for memory failure events via a > blocking_notifier_head Eww. As I said I think the right way is that the file system (or other consumer) can register a set of callbacks for opening the device. I have a series I need to finish and send out to do that for block devices. We probably also need the concept of a holder for the dax device to make it work nicely, as otherwise we're going to have a bit of a mess. > This obviously does not solve Dave's desire to get this type of error > reporting on block_devices, but I think there's nothing stopping a > parallel notifier chain from being created for block-devices, but > that's orthogonal to requirements and capabilities provided by > dax-devices. FYI, my series could easily accomodate that if we ever get a block driver that actually could report such errors.