Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp3321648pxu; Tue, 15 Dec 2020 04:22:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxP8Jt/5XejtDp3xT6YGjYudyRfrXrFfh2EaT+zN3+5sW1YLMCUDxCFDvZMGte2/SWBqg1o X-Received: by 2002:a17:907:2116:: with SMTP id qn22mr26694106ejb.483.1608034967760; Tue, 15 Dec 2020 04:22:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608034967; cv=none; d=google.com; s=arc-20160816; b=sqqMSz6/rXzxj923efw+CA0M0KWDHAwRj349hiG5HNlJ2WueV2vE3TA2UPkWMVW9Zl YrYMLdTldRdJmQmPvz1E4qTBhurefhYArL8TMtPht9QoQz9Smhp6qlU/pGDlUSzo+lc8 HaofeEkYYsVNVsAHWVIIAsR3tTVZ8zERlcMxlOxOVbON9LC1BRgeYdxJ+JxDeF7Fy7jI zf7QnC6tnEPLSxlU3yyLgIY3iMIGOi0pmkY4n1i/CRrcSP4xVrNg/2249nzfgrd0fKuw qoFGOV7cHltAvT3FBqZsWMu05vC4VDSkEoCZemmGGIJRHW0nqMVJ9FmDc4REGhUIvTZC KrGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=CADRg8bhfeFYyoDtv5Cyl5fQW8DGoyR9YFy2mKUDYDU=; b=JqwO1kyql48HdsoMyByjMSrPGdiceWDnqWGbdG1kQq7xS/d+orqs33VZvktQ3tkk5y 6HHIB4BSHwv6fliv2fBIaaX3xDClmEpIRZmQYYWMx5UOJ+wO6hFGeumH0PKbEmsYfJ4f LRrsJuZ8a1sNlKsIjJsJ3yLUafPLE20oChaam2gXKqYxaya+sVa9HBUWF8j0a+e9s8Mi ACubYDuCiMOTnFmr03dT+3V20PD4jWXLc7du3aqBQyQo4tlVsNc0ID68GxCuvoEP9Ggj 8ib7nNj/wi7H7lnK3bQrt9qsVRGSISjB+KXMDIBJg42t3DyJa2h+FZiAp44ZU54ncJJI 7OuA== 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 o11si766589ejg.118.2020.12.15.04.22.25; Tue, 15 Dec 2020 04:22:47 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728990AbgLOMQ2 (ORCPT + 99 others); Tue, 15 Dec 2020 07:16:28 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:22826 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728632AbgLOMQD (ORCPT ); Tue, 15 Dec 2020 07:16:03 -0500 X-IronPort-AV: E=Sophos;i="5.78,420,1599494400"; d="scan'208";a="102420180" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 15 Dec 2020 20:14:36 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id B204E4CE5CCA; Tue, 15 Dec 2020 20:14:31 +0800 (CST) Received: from G08CNEXCHPEKD05.g08.fujitsu.local (10.167.33.203) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 15 Dec 2020 20:14:30 +0800 Received: from localhost.localdomain (10.167.225.141) by G08CNEXCHPEKD05.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 15 Dec 2020 20:14:30 +0800 From: Shiyang Ruan To: , , , CC: , , , , , , , , , Subject: [RFC PATCH v3 2/9] blk: Introduce ->corrupted_range() for block device Date: Tue, 15 Dec 2020 20:14:07 +0800 Message-ID: <20201215121414.253660-3-ruansy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201215121414.253660-1-ruansy.fnst@cn.fujitsu.com> References: <20201215121414.253660-1-ruansy.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-yoursite-MailScanner-ID: B204E4CE5CCA.ADEE6 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@cn.fujitsu.com X-Spam-Status: No Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In fsdax mode, the memory failure happens on block device. So, it is needed to introduce an interface for block devices. Each kind of block device can handle the memory failure in ther own ways. Signed-off-by: Shiyang Ruan --- include/linux/blkdev.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 033eb5f73b65..45256fe84fa7 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1858,6 +1858,8 @@ struct block_device_operations { int (*report_zones)(struct gendisk *, sector_t sector, unsigned int nr_zones, report_zones_cb cb, void *data); char *(*devnode)(struct gendisk *disk, umode_t *mode); + int (*corrupted_range)(struct gendisk *disk, struct block_device *bdev, + loff_t offset, size_t len, void *data); struct module *owner; const struct pr_ops *pr_ops; }; -- 2.29.2