Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp717709pxj; Thu, 3 Jun 2021 18:21:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyMn70/pJ5bOEvlFhkQJ4pVCVG/ZmcoJBty+tIO8bCBe5aSLUJ3IpHT0fOgplSh+dE28/BF X-Received: by 2002:a50:8d84:: with SMTP id r4mr2209088edh.24.1622769681556; Thu, 03 Jun 2021 18:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622769681; cv=none; d=google.com; s=arc-20160816; b=oFvVwpkbk8zXk/KMjVPnbGGSRquJ5hPdtaiHJDeamWkAmQh4HaFn13o5yV251zKPAP WR5JKmxtjw/ViDCYUW637w+5EI4TmtP7jcQ0lQLczNYOT2VlVL4Tz1cnJ/MZVulvuDWk ycT1Hh9jUGdY5webA8QpXo5J2UwFMvL8LpPzAznYSTJ24iQpmq7M1hxh2LmEI6kn7uiV BpmCfwtxrRpoFEwrJIUAOEuWY4zA3CWjk0F/whS/MUB9sS5vqfLupje+rYtfQYEHV5c9 Gz3HVNr2L0+0IH/GhlLdYQmET8pzCCAe2eseAmyS71+TDa+CK1mEXI9MdJHkzsN/w1jl dPHQ== 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 :ironport-hdrordr; bh=AjS8TVPrIQiLGCtC6TeR01LjZRlyQroWoV9NNYzv/7E=; b=tIaTH7i4KzNNouNoZS/3K3Ya7EYsD8WQLqtN1NBl4MLEpyC+/Xkl1N6temYfFZylfp 90WT28mL9ZCsV9Wl9fuwvfN16sRPXDfl2gTcY6aq/egf8aSoTw8st8ciqkYcpoV/kK3G qul6P7ueDZ/zx8Ab7ENroq1f7hdl+zfskAQa/wjpS2uMsvU3TJTJLz5FfKWlpQOfDHpi 3EQXnDRETWjy8OCOqv7eVY02vSieiFWZkr85l6ZNkBHDZjVU/StdJCA86T4Oz4CKIWVy mE1uksjWXX9eADMpJ66xkHfWTMW8CNZQZoxGn3/h7JTk/+bZ+9FYdo0RWS9eJ3u9VR8Y Pu7w== 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 cm2si3423407edb.457.2021.06.03.18.20.58; Thu, 03 Jun 2021 18:21:21 -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 S229996AbhFDBUr (ORCPT + 99 others); Thu, 3 Jun 2021 21:20:47 -0400 Received: from mail.cn.fujitsu.com ([183.91.158.132]:45492 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229882AbhFDBUm (ORCPT ); Thu, 3 Jun 2021 21:20:42 -0400 IronPort-HdrOrdr: =?us-ascii?q?A9a23=3A97nSk66uC1F30wIpuQPXwCzXdLJyesId70hD?= =?us-ascii?q?6qhwISY6TiX+rbHJoB17726MtN9/YhEdcLy7VJVoBEmskKKdgrNhWotKPjOW21?= =?us-ascii?q?dARbsKheCJrgEIWReOktK1vp0AT0ERMrLN5CBB/KTHCReDYqsd6ejC4Ka1nv3f?= =?us-ascii?q?0nsoaQlrbptr5wB/Bh3zKDwMeCB2QYo+CIGH5tdK4x6peXEsZMy9AXUfG8fZod?= =?us-ascii?q?mjruOdXTc2Qw4g9BKVjS6lrJrzEx2j1B8YVD9VhZcOmFK16zDE2g=3D=3D?= X-IronPort-AV: E=Sophos;i="5.83,246,1616428800"; d="scan'208";a="109209788" Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 04 Jun 2021 09:18:54 +0800 Received: from G08CNEXMBPEKD06.g08.fujitsu.local (unknown [10.167.33.206]) by cn.fujitsu.com (Postfix) with ESMTP id B3A5D4C36A05; Fri, 4 Jun 2021 09:18:52 +0800 (CST) Received: from G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.80) by G08CNEXMBPEKD06.g08.fujitsu.local (10.167.33.206) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 4 Jun 2021 09:18:54 +0800 Received: from irides.mr.mr.mr (10.167.225.141) by G08CNEXCHPEKD07.g08.fujitsu.local (10.167.33.209) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 4 Jun 2021 09:18:52 +0800 From: Shiyang Ruan To: , , , , , CC: , , , , , , Subject: [PATCH v4 03/10] fs: Introduce ->corrupted_range() for superblock Date: Fri, 4 Jun 2021 09:18:37 +0800 Message-ID: <20210604011844.1756145-4-ruansy.fnst@fujitsu.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210604011844.1756145-1-ruansy.fnst@fujitsu.com> References: <20210604011844.1756145-1-ruansy.fnst@fujitsu.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-yoursite-MailScanner-ID: B3A5D4C36A05.A0A85 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: ruansy.fnst@fujitsu.com X-Spam-Status: No Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Memory failure occurs in fsdax mode will finally be handled in filesystem. We introduce this interface to find out files or metadata affected by the corrupted range, and try to recover the corrupted data if possiable. Signed-off-by: Shiyang Ruan --- include/linux/fs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/fs.h b/include/linux/fs.h index c3c88fdb9b2a..92af36c4225f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -2176,6 +2176,8 @@ struct super_operations { struct shrink_control *); long (*free_cached_objects)(struct super_block *, struct shrink_control *); + int (*corrupted_range)(struct super_block *sb, struct block_device *bdev, + loff_t offset, size_t len, void *data); }; /* -- 2.31.1