Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2600025pxb; Sun, 17 Oct 2021 20:08:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1mv9JtjnQtjU4Sb/95RKBq8R7C1wbXoCmXI6r4jg22n74aVSgRgBZZj9+m0SSbN2IjoX5 X-Received: by 2002:a05:6a00:9a2:b0:44c:b979:afe3 with SMTP id u34-20020a056a0009a200b0044cb979afe3mr10255429pfg.61.1634526492821; Sun, 17 Oct 2021 20:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634526492; cv=none; d=google.com; s=arc-20160816; b=S8oPxIP2QFIwHB5FWkrrklSwzwuiiVP9wl84TBfqkbvOaivcMuJGTDAoVxv235RDgo iEx9dymHBn5E2ZUIYLHbB89cY0OTz85Ofr6WsXfRof1naH69MYI8T8DKKFms7I36JQWd 48CpaliETgFCF4zUGXQJDwecfpghXajKfvc67L9AGWICPxgmLft6YIx6z+VTQeFdHJCb 0uflOhdcyR6hnTMHu9aQdCz5b9MHvK9g+Eg3u9j4PHd2ctO8PzR78sU39IVUtZFy3Qe7 oM7dRKKasK0IGJQIfAWkZkLCSV7ERcJp3Iq2QVKch2FFVuH9fx+0qT//tHGxeFWE8Gqi rtsw== 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=Fy8JX1MISO+E6iiO8M4K0L0jBN1ZBpTt5D/TgO1B54U=; b=YWxn5hokhzTPYIq/N7X1Uo6RFbcoSKkdqdztAZLHAyZM3LsBldB1cHqJ5ThvD1xN6N j6N/1iac1M7pxF5y7Uv27BBv8goaWpfkkfGtFfsMMYL2OM+V4pPN3aYkChR5+M/5FoEi ezWv5w9mMwMZCkz1EDFTH0EC1y8XGj7h4YRwPcybvx+SMh/VSoZziw90wYcIRoqJD6hR B3EZ+jOTY5Xr46Uf8KcgrBDefd3ctWtyF7btXbcH32G0/bAWnWCWRSwQ9JK15N7X3+Ze PxvGAzCIr9dFw8w56BCtsWCvJQ7kw0J1DVULMxtzZx7tgSe3eeeS1s+ocZZ1avOg/Ph4 YMrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U7+cTP+W; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s15si367162plq.364.2021.10.17.20.08.00; Sun, 17 Oct 2021 20:08:12 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=U7+cTP+W; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238651AbhJOVuf (ORCPT + 99 others); Fri, 15 Oct 2021 17:50:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbhJOVue (ORCPT ); Fri, 15 Oct 2021 17:50:34 -0400 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 968E5C061570; Fri, 15 Oct 2021 14:48:27 -0700 (PDT) Received: by mail-ed1-x52b.google.com with SMTP id w19so42995557edd.2; Fri, 15 Oct 2021 14:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fy8JX1MISO+E6iiO8M4K0L0jBN1ZBpTt5D/TgO1B54U=; b=U7+cTP+WOIeSHVdUukK9i8mAbLqOyx+qsv7LKqyA1d9LnYKxTxqGp1qFfzQBmZyub+ 2WS2AsPbS3Bzn0j4xDW2BZBmYT14PRpRBy200SYYKaHLTLw5c++3nj7sinEL6J2+v0Zr rwP3kfkTJquHOTMXOuyjwxtkES4zGr5M9wjHJJZ1J7bAr3qG12JioOORDjt/yCPNKI2e LCBig775MW/n7T7ugT5XMIRgbePHsJppd0XpLXu8CRjlyDYyls5yD3jDl1bWo+cVwgwE tK3WeidHc6CVSXMf6j/+gPQKKU8wM75aPxRVHInezczSE8WO1B73zapsU87whFU0gn35 Xgcw== 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=Fy8JX1MISO+E6iiO8M4K0L0jBN1ZBpTt5D/TgO1B54U=; b=IS2z4he2rfqmoIqn7vOAUWODR0vH4THyLLPjakhl+4arwJKk0Up2ZdVeFVZPWDeDvI 5GJpHKQxcKlfHoqIJM+HwMuQ+WXWQnblrwvHvowiJY6r17qJRLf4M+OPXVjrEnf7Bopf a3AU574tZmFqUkpU8bhMf5PFTSM816mTOyqwxyVfq28XzHyoMdYZv4mAzDD+VLBfOKls 6o6JR8UF+Pu6tz8EgrbtAdC7V2zxOO2LhFrbIN3EX7FOzdGHLpPd1r8A6MHiRT06j9TR f2mjm0Paz8MXW5RYP/3eF3l5m6fAeZ8QvNYjB5co1i6xgOo/1SQYvifD5nSTWsGVad2f +JHA== X-Gm-Message-State: AOAM531dE+XkkKFXtkWVNBAXPfdKAaOhJ+ka68CEVCjOc1g2RJYZIqm0 Eu2NC40lrzWmeSu2K933oDnwEXxjd3PxDCXB9zg= X-Received: by 2002:a17:907:6297:: with SMTP id nd23mr10244354ejc.62.1634334506069; Fri, 15 Oct 2021 14:48:26 -0700 (PDT) MIME-Version: 1.0 References: <20211014191615.6674-1-shy828301@gmail.com> <20211015132800.357d891d0b3ad34adb9c7383@linux-foundation.org> In-Reply-To: <20211015132800.357d891d0b3ad34adb9c7383@linux-foundation.org> From: Yang Shi Date: Fri, 15 Oct 2021 14:48:14 -0700 Message-ID: Subject: Re: [RFC v4 PATCH 0/6] Solve silent data loss caused by poisoned page cache (shmem/tmpfs) To: Andrew Morton Cc: =?UTF-8?B?SE9SSUdVQ0hJIE5BT1lBKOWggOWPoyDnm7TkuZ8p?= , Hugh Dickins , "Kirill A. Shutemov" , Matthew Wilcox , Peter Xu , Oscar Salvador , Linux MM , Linux FS-devel Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 15, 2021 at 1:28 PM Andrew Morton wrote: > > On Thu, 14 Oct 2021 12:16:09 -0700 Yang Shi wrote: > > > When discussing the patch that splits page cache THP in order to offline the > > poisoned page, Noaya mentioned there is a bigger problem [1] that prevents this > > from working since the page cache page will be truncated if uncorrectable > > errors happen. By looking this deeper it turns out this approach (truncating > > poisoned page) may incur silent data loss for all non-readonly filesystems if > > the page is dirty. It may be worse for in-memory filesystem, e.g. shmem/tmpfs > > since the data blocks are actually gone. > > > > To solve this problem we could keep the poisoned dirty page in page cache then > > notify the users on any later access, e.g. page fault, read/write, etc. The > > clean page could be truncated as is since they can be reread from disk later on. > > > > The consequence is the filesystems may find poisoned page and manipulate it as > > healthy page since all the filesystems actually don't check if the page is > > poisoned or not in all the relevant paths except page fault. In general, we > > need make the filesystems be aware of poisoned page before we could keep the > > poisoned page in page cache in order to solve the data loss problem. > > Is the "RFC" still accurate, or might it be an accidental leftover? Yeah, I think it can be removed. > > I grabbed this series as-is for some testing, but I do think it wouild > be better if it was delivered as two separate series - one series for > the -stable material and one series for the 5.16-rc1 material. Yeah, the patch 1/6 and patch 2/6 should go to -stable, then the remaining patches are for 5.16-rc1. Thanks for taking them. >