From mboxrd@z Thu Jan 1 00:00:00 1970 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 1CC4CC433F5 for ; Fri, 13 May 2022 13:17:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6EEBC6B0073; Fri, 13 May 2022 09:17:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 69F336B0075; Fri, 13 May 2022 09:17:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53F0E6B0078; Fri, 13 May 2022 09:17:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 423EA6B0073 for ; Fri, 13 May 2022 09:17:18 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 1721E20B6C for ; Fri, 13 May 2022 13:17:18 +0000 (UTC) X-FDA: 79460770956.13.39CF279 Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181]) by imf03.hostedemail.com (Postfix) with ESMTP id EEC65200AF for ; Fri, 13 May 2022 13:17:08 +0000 (UTC) Received: by mail-qt1-f181.google.com with SMTP id x22so6767515qto.2 for ; Fri, 13 May 2022 06:17:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=0v+FfOsKq5VWpBjWpQKF+Samyecdm66+rnpTGWhFy5Q=; b=GujRUI3WLq3U7M0kMpyk3Rtgb6bm1R2ZA+3/qJiD5xxo+qI5bWYtSqI9ORhx0A4CVO AJo8ghYwuEUd0w4lqtS40h9p0HhrOD4gZqBJ18Bs29k3MVtWiuOxjUZg10flnhVJ41/D vCQtzX6cu5hN6zJxZdpDfruOz25z8AupG4bP63sASGnaAAtjWXaCdWEwnraN13T+ZCsp 45pWzN5j4ZRLjCeBf4uGAcpnNft2J8rjDk3Vk1+RbNzAojaX917SBAlLRBPJXYuBm9t/ Yh6e7oFLoc5iYd6k3vMlPBZ7dky9I9xOwJEF/H6yWDXrHQ8/og0RKUVHBehuh6e0R7v6 k3gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=0v+FfOsKq5VWpBjWpQKF+Samyecdm66+rnpTGWhFy5Q=; b=HqwkVq/lYtrl11uBOkc6CggKA/reSFgjE2bIJbyotyg8X9XWaO4+4R6N5kraAzPjkc /bOvH2s/iu5pRexvi6CPQAezXYyWJx6fgkYNB9RRabpxmnMk+t18ALloKao3AEQnV2DY vQroN+58VT5VOa/csSr7oK267EjzgZI86QsG2UuFaiYME/KSqHAbXXFRRfO2TlxnoAuc 92KGXm62ednfjjy6mPbXxJiaUNqkXKdmffSWXRLNJcMrfJiAkUK3eRrLwmzaAm9UYkqo kymONCWfoG4cgTPAPpZXGfti5lQGNOYwml/YJ0Vif0zq6wfzkGfwI6KDFf6W7sRVS0kT 6Ufw== X-Gm-Message-State: AOAM533Wt1dD2/OXbnnZEZmtLpASiE+cG9vrRI60TjyGYnCY7rv1Yfz2 bpBD6YO8UFmIzCVX35SHzU1XaQ== X-Google-Smtp-Source: ABdhPJyNw5Wg+jqj7dr9lMG9SfNu1+W1unb/0JVNGsyXFciINrRjjGcYTqlcvGLHprg+QUvdFpA96A== X-Received: by 2002:a05:622a:6115:b0:2f1:d8fa:84aa with SMTP id hg21-20020a05622a611500b002f1d8fa84aamr4501160qtb.689.1652447836416; Fri, 13 May 2022 06:17:16 -0700 (PDT) Received: from localhost (cpe-174-109-172-136.nc.res.rr.com. [174.109.172.136]) by smtp.gmail.com with ESMTPSA id r18-20020ac85212000000b002f39b99f67csm1348296qtn.22.2022.05.13.06.17.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 06:17:15 -0700 (PDT) Date: Fri, 13 May 2022 09:17:14 -0400 From: Josef Bacik To: Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org Subject: Re: Freeing page flags Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: EEC65200AF X-Stat-Signature: scjp6jsurn5te8ihoft83kqnpdrjnkzs Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=toxicpanda-com.20210112.gappssmtp.com header.s=20210112 header.b=GujRUI3W; dmarc=none; spf=none (imf03.hostedemail.com: domain of josef@toxicpanda.com has no SPF policy when checking 209.85.160.181) smtp.mailfrom=josef@toxicpanda.com X-Rspam-User: X-HE-Tag: 1652447828-488818 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: On Fri, May 13, 2022 at 04:39:28AM +0100, Matthew Wilcox wrote: > On Thu, May 12, 2022 at 10:41:41PM -0400, Josef Bacik wrote: > > On Thu, May 12, 2022 at 09:54:59PM +0100, Matthew Wilcox wrote: > > > The LWN writeup [1] on merging the MGLRU reminded me that I need to send > > > out a plan for removing page flags that we can do without. > > > > > > 1. PG_error. It's basically useless. If the page was read successfully, > > > PG_uptodate is set. If not, PG_uptodate is clear. The page cache > > > doesn't use PG_error. Some filesystems do, and we need to transition > > > them away from using it. > > > > > > > What about writes? A cursory look shows we don't clear Uptodate if we fail to > > write, which is correct I think. The only way to indicate we had a write error > > to check later is the page error. > > On encountering a write error, we're supposed to call mapping_set_error(), > not SetPageError(). > Yup I can't read, the places I was looking did mapping_set_error() in a different area from SetPageError() so I got confused, so this can be ripped out of btrfs with no problems. Thanks, Josef