Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3392550pxb; Mon, 25 Jan 2021 15:08:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJxN1Dd7VdZ8NQm3KZpu1HKDahan77pkTN13kivRe7bHuE9XG4JFF1Cv7BYulZyCV59tFfR+ X-Received: by 2002:a17:906:b757:: with SMTP id fx23mr361543ejb.273.1611616125465; Mon, 25 Jan 2021 15:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611616125; cv=none; d=google.com; s=arc-20160816; b=qlsKy9gsQ22HmKDGNuHVwEw+80peBsYcCFESw+8ZtaZZqylWlpJvsbD3SlKdfsR8pt 84DD4wvBqXMVqd5I9cp1uOWrQN961ILw7ekdjiElUCmuDlVekLbsqbadjvJCjzBjQljh wuv+zNEJUBeNa2gwDSSPwruQce7X/OJiq1FgUJTSU6aZZ84tTFQ/xpuNipmhVNqS18DW K9piLXFy9spSAKFEuy909/RiQx1bzD5euMY8Faj5Vj//yDHsN4IEsgkONt7LwemTe5ce EJcYMTQZK+61H/KT7gH2pi0vWiJNviGl1v2LEmgkL7ZFz9r9b2/nHQ83ueMnIq2KpmaV qZuA== 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=HkFVh4AJpeuhb0mYlbcDmtGY2jp9QvvcbT+1rsWnMWU=; b=noInqE2BDqtKFLVNlprhroYb+T72HxMQxXaeSGZMO9WSuizmQh0VmMH+J57E5DVC2D /98GNnFZC02UVSmsgb9ldr6wswilE8RL6JqQBUmeyugVQw6YqRJI7Er4PgUAD52BrogH vnd5SLrGLa5k24oXxD4IZ8m1QtD/uNaUIjfSdaMrfioYgAUORKVB/5Xaj+CEa4QMUewB AUd2e6Ao0xjriEZTmoaLXgdKLG1C2eR4lFnygW1Gt3m9d4e9PufR8VaVnlM4Y6LnheO6 f0+NhnPTAdzaMXwVYfle3jXGPc3i8H9oElzMwGyNdrdLWqy0uu8PxpewMzp59hGSOzds qOIw== 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 r7si6499461ejx.5.2021.01.25.15.08.20; Mon, 25 Jan 2021 15:08:45 -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 S1731500AbhAYXFT (ORCPT + 99 others); Mon, 25 Jan 2021 18:05:19 -0500 Received: from mail.cn.fujitsu.com ([183.91.158.132]:13713 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732585AbhAYW4d (ORCPT ); Mon, 25 Jan 2021 17:56:33 -0500 X-IronPort-AV: E=Sophos;i="5.79,374,1602518400"; d="scan'208";a="103820570" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 26 Jan 2021 06:55:32 +0800 Received: from G08CNEXMBPEKD05.g08.fujitsu.local (unknown [10.167.33.204]) by cn.fujitsu.com (Postfix) with ESMTP id BB90D4CE678B; Tue, 26 Jan 2021 06:55:32 +0800 (CST) Received: from G08CNEXCHPEKD04.g08.fujitsu.local (10.167.33.200) by G08CNEXMBPEKD05.g08.fujitsu.local (10.167.33.204) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 26 Jan 2021 06:55:33 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD04.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 26 Jan 2021 06:55:31 +0800 From: Shiyang Ruan To: , , , CC: , , , , , , , , , Subject: [PATCH v2 02/10] blk: Introduce ->corrupted_range() for block device Date: Tue, 26 Jan 2021 06:55:18 +0800 Message-ID: <20210125225526.1048877-3-ruansy.fnst@cn.fujitsu.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210125225526.1048877-1-ruansy.fnst@cn.fujitsu.com> References: <20210125225526.1048877-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: BB90D4CE678B.AC883 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 f94ee3089e01..e0f5585aa06f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -1867,6 +1867,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.30.0