Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp5740199rwl; Sun, 8 Jan 2023 21:55:30 -0800 (PST) X-Google-Smtp-Source: AMrXdXs5d8vJseua2QjrhT+7E4uC1/k1P/4czFpbbu/4w2uXW6nJIqfVz+9bzqAgYUyU/jPHdEUz X-Received: by 2002:a17:907:7ea1:b0:7c4:f752:e95c with SMTP id qb33-20020a1709077ea100b007c4f752e95cmr69638080ejc.1.1673243730364; Sun, 08 Jan 2023 21:55:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673243730; cv=none; d=google.com; s=arc-20160816; b=aeV1bDupUk828t1nPeHTxr5NxCYpPW2nRWoY/GppmVHAGC/gQym8DMKOAPj2lHYRYj CUiqbRln/dzocBjYoKoz3q1TludS8/mWJnMLBDXJdR3AD3jNX9pUbB8Ngjt34tRgiVo0 77WCmaAluwy4ktpyjA2EReLeDU+A/KuIggrWPIEUMIdPy73ykWKi9bSC7+cjVUYH71PI n2+CupJHMrN9fvQd7ai4LdLVdq8p7wzXwGr3YNxnzM+mZFGkdjPnoG9beKcOQFVcRM8q CtjLev8dTxpv6Ptcx1M52P4oWddZNhoEV8lHmHRWODw9iYhVMzRO8HxOf43/Ilyxxubf vjCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=/TboxjvLj2LzaTPo6wOwSPdZqcAQLPCIOhhkOsSnAto=; b=stc+iPEZ+Ysz3NwUEEj1q/qn0uC9sEYhEDJzU4YDWgazDjdv34vc1k02H+h0voXrbg yEpzzJUVybyNUCzKzhcpwOrrvMBTQJ8mp03ggnbvnqwSMNj8OGJwCKKR7+xWPfW2IroU vXZTRkGhR0dyWIUo/pnylvZqj2MopIvMRtN+Go+jO82hTfRCPw6aIYkkSXt7iALLTnCC gkBiyeWUFPx6C77M60YsF2f2QL2bpHq/oEtc/BWoLLBjO7qyD1LHEJcqPQyclp0/gRVV owpjDJVlVFVOQKXOAwn6PEo3xdna05G6lDJRsAm0d5JyBL1ZaYiuZaKLVZ89+1oVHzpX tThQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=nb4a5StF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf11-20020a1709077f0b00b007c167bc7df9si10062021ejc.255.2023.01.08.21.55.18; Sun, 08 Jan 2023 21:55:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=nb4a5StF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236502AbjAIFT0 (ORCPT + 52 others); Mon, 9 Jan 2023 00:19:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234729AbjAIFST (ORCPT ); Mon, 9 Jan 2023 00:18:19 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2C4DDEBB; Sun, 8 Jan 2023 21:18:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=/TboxjvLj2LzaTPo6wOwSPdZqcAQLPCIOhhkOsSnAto=; b=nb4a5StFHAwGzV5DL8zXSWnxJw zX600UOuwgmVsgmjNFBmqtMFxS3xy8oIktPbQkH8TRK7ibTOd9FSpSh760MmC9CNX44HBqsWmi/N/ UDlCxOA7LujBoWs15c9vzwZdsHq5P+N6jwyH3KWvAvYzHO2vlJFU9V1QNqyBGQRrdrZwNcdugBvtP 3zAHtqfRrI9/eo03r3LBI3D0DlE6gp7IrVEkLzTfqFcNiqtxYLZGQs5aDUuOlcHvk31wtghpU8Omp 15oltxC23wFZYvXnu2blmo/TycCTrH3pEYJvW4N4bLOfpWYrtEf0G6ZhxHe1M6ij03Kc3FJ4BHc5S 19VIUrTA==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1pEkYC-0020wm-NL; Mon, 09 Jan 2023 05:18:25 +0000 From: "Matthew Wilcox (Oracle)" Cc: "Matthew Wilcox (Oracle)" , Jeff Layton , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Hellwig Subject: [PATCH 01/11] memory-failure: Remove comment referencing AS_EIO Date: Mon, 9 Jan 2023 05:18:13 +0000 Message-Id: <20230109051823.480289-2-willy@infradead.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230109051823.480289-1-willy@infradead.org> References: <20230109051823.480289-1-willy@infradead.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The EIO is now reported to every caller which has the file open on the next operation which returns an error. We obviously cannot check whether the user took action correctly on that error, but we can remove this comment as wb_err is never cleared, unlike AS_EIO. Signed-off-by: Matthew Wilcox (Oracle) --- mm/memory-failure.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index c77a9e37e27e..1a1c66f7e5dd 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -992,34 +992,6 @@ static int me_pagecache_dirty(struct page_state *ps, struct page *p) * who check the mapping. * This way the application knows that something went * wrong with its dirty file data. - * - * There's one open issue: - * - * The EIO will be only reported on the next IO - * operation and then cleared through the IO map. - * Normally Linux has two mechanisms to pass IO error - * first through the AS_EIO flag in the address space - * and then through the PageError flag in the page. - * Since we drop pages on memory failure handling the - * only mechanism open to use is through AS_AIO. - * - * This has the disadvantage that it gets cleared on - * the first operation that returns an error, while - * the PageError bit is more sticky and only cleared - * when the page is reread or dropped. If an - * application assumes it will always get error on - * fsync, but does other operations on the fd before - * and the page is dropped between then the error - * will not be properly reported. - * - * This can already happen even without hwpoisoned - * pages: first on metadata IO errors (which only - * report through AS_EIO) or when the page is dropped - * at the wrong time. - * - * So right now we assume that the application DTRT on - * the first EIO, but we're not worse than other parts - * of the kernel. */ mapping_set_error(mapping, -EIO); } -- 2.35.1