From patchwork Sat Apr 20 02:50:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13636960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50BE2C4345F for ; Sat, 20 Apr 2024 02:51:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 77FA96B007B; Fri, 19 Apr 2024 22:51:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 72F196B0083; Fri, 19 Apr 2024 22:51:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 61DE36B0085; Fri, 19 Apr 2024 22:51:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 440EE6B007B for ; Fri, 19 Apr 2024 22:51:09 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E899A1203E0 for ; Sat, 20 Apr 2024 02:51:08 +0000 (UTC) X-FDA: 82028383416.09.5745C6A Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf05.hostedemail.com (Postfix) with ESMTP id 5A7BA100004 for ; Sat, 20 Apr 2024 02:51:07 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=vqdJT0nE; spf=none (imf05.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713581467; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=KHvcC88/pFabYoyBrEUaVAQ7LuFYjaoB++gJdYEMqMk=; b=SZPrfIuhhgmLODiPULr0HTrubV3XfM2Zb6XlIf4fTOEXVSBZSi6H1H967qDpt83mgqQtLy VLSjVcxMGTkTntgUWJ+pKj6hoTFXufLXHv0NrVlm8LIuAr77jWvMpMRd4hbyOZpXHSh2LK 9VTLN2UiFR463FVLbD2ENRUr+6t9FgA= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=vqdJT0nE; spf=none (imf05.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713581467; a=rsa-sha256; cv=none; b=cqq69NeQRImbzWfEmhAI/AxROwMMGN0c0Bk25j7348pajmZ0JTb6IXrE5Tp17LVKOE1KDN hGpqKhPVFDbVDuqbQnpiAWVuBgYe+DVW2/hkX4rrWJ0SF+DwnngOVB26Va64d/Qr18rmV5 n7YAb7cYgwVnLjd1Wf6mgMGh/nt9SJ0= 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=KHvcC88/pFabYoyBrEUaVAQ7LuFYjaoB++gJdYEMqMk=; b=vqdJT0nEXCKSdIsJzTGyeB8zZb 7ce6yZkOlsM/ZJe9kVOk3cGuSBx0iufVxvmEnXhkX4y+RXp1LRADSafM9rEGBg9s0uP0dhg3+Y1xo Set/EFY76hIoKb/AeznBt9DP6kDkioRbtMYJZW8hwyzUHHvA6jk6HBcwVlcTAiUT5dA9iQ8RfcozM JL4F7LB6P/7eDCiWDL30wjjJmrgO3idiDnfo8O+azSzAz0M+Ov5FRVMOKZgMuO63YP4qbi139O6xw 5Jsy15obZODuLOL2WIxKlfb6GU8bodz6FqD4x5o4twVQJlnCxJI629dMpbi+zl4zXo8xkrCuHtPOv 4QCexmfA==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1ry0oe-000000095gf-1OC7; Sat, 20 Apr 2024 02:51:00 +0000 From: "Matthew Wilcox (Oracle)" To: linux-fsdevel@vger.kernel.org Cc: "Matthew Wilcox (Oracle)" , Miaohe Lin , linux-mm@kvack.org Subject: [PATCH 26/30] mm/memory-failure: Stop setting the folio error flag Date: Sat, 20 Apr 2024 03:50:21 +0100 Message-ID: <20240420025029.2166544-27-willy@infradead.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240420025029.2166544-1-willy@infradead.org> References: <20240420025029.2166544-1-willy@infradead.org> MIME-Version: 1.0 X-Stat-Signature: ybhmujguqqukofkrx36647rmjjrjp6pk X-Rspamd-Queue-Id: 5A7BA100004 X-Rspamd-Server: rspam02 X-Rspam-User: X-HE-Tag: 1713581467-153269 X-HE-Meta: U2FsdGVkX1+nuY0LfLEDD+1Zar4hgQY50d2t68spUrmjpeblSlMAfWe3+j+OJK5lODJqsHshDyPkbEO7iiJg+gd/zShvDW/BMMux1ipUxuG2VRrZ7eCOEhzBXXlTjkaGfTXqJt0JSuCxIswlheK6rv2VupqF0WY02gQvoXxcVFk0LgexMfAsvjx+Z2eakBCfkYB+LYmfYmR27+HIWSaKDJVwcs2UCLlGLDa1Kbn7Rv79P07hvV92TTwTDYBcjMgm5MpSPg7GiGP8q0+Lw77+fFPDQDEqCSek19x+2wJlTiHOY3CuVG50Xc/5VnGhQr+B28M6KyeMVhUy1fJ4akHV+A2R7bf/PLo/4hCbLUQPhku0CaRz9yNU9MjGCF/pwLYeqmfc24oqKMhhzFFl5WalVbGjsdE8MQ5V0oZPwBsFKvTKb8DFhnHXxxIzpmBOgbUox5qRMfoyYfF06vOvTlON7IypDYI17vfQFbEAt6ArseR+g1f3305VoHkBZwZNcDhoZazaaWQ6g0vX2vIe3ayUpTcPEBvPONxgwEPtPNpuVTKF7vJel9Bs0h/dkqZQvrBaUSU4dllE98X+g76XASo6D5UqRg77Zdx0BZ1YQS/zqbqS+cgSXmgT1MeJdzRU83LaOFVxn9l/8myzXNNSGSrU9bDC2PzdIztMu1TjFYg1iytQ7tcqY0fI1tf5x0G5zZaMFNM08AAUve9QCiY6ALaBztdRP9mfMKgoxZpIE377UIKAcyAGDJo32ax0LH9McyrsR54j5vlBQlxzwpDSloLLz475BFJ82nrtFpQKQ/GQJG6VZSosKhV0SA6Q2YzY6nHk6LkUqqCZmW2hsU61c5Jc6VvIOVo+186U0TDJsRTXRczm4KGVynofKq1M8L5IQ+nkCOUF6d7HDXbrLfX7kGPeQ5W6gcgLINiN0bk31PfDYsKx9WWeQ2dgcFuuRvA/13zqqp64QCqSYJ++Alew5E0 1qxSODHh PQimj9MjagHB0KHZbJpPqw6P/JIA0eEdvknGl4F9sd9dt/HW4A04EzZqRtb/4KshNS8lJfsRrTYH3UmOeVv0pbrg3awcjbURI8LeCxhxl5/LObOwg9/FfV36ofdPIRdM4nu3IcAutG4k2VFJXbptjPITZfacfiUDBXqvqI+ypFeGp41YV+3CulVx6wGL2XJreg0/bCdAdwbYIVbUQtxLZiReldXoIIACT/0ovz5wbL9mCcLgxvL79kqhHCvi+mmPO3LX09fJpj8DS87DBz+xr8kz5M4SA2CvVZHvZ X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Nobody checks the error flag any more, so setting it accomplishes nothing. Remove the obsolete parts of this comment; it hasn't been true since errseq_t was used to track writeback errors in 2017. Cc: Miaohe Lin Cc: linux-mm@kvack.org Signed-off-by: Matthew Wilcox (Oracle) --- mm/memory-failure.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/mm/memory-failure.c b/mm/memory-failure.c index ec30611ec5ad..e065dd9be21e 100644 --- a/mm/memory-failure.c +++ b/mm/memory-failure.c @@ -1092,7 +1092,6 @@ static int me_pagecache_dirty(struct page_state *ps, struct page *p) { struct address_space *mapping = page_mapping(p); - SetPageError(p); /* TBD: print more information about the file. */ if (mapping) { /* @@ -1100,34 +1099,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); }