Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2550944ybz; Sun, 26 Apr 2020 22:56:20 -0700 (PDT) X-Google-Smtp-Source: APiQypKjLWTlWFOjcl6SIIWP1c2nomQx6Ujrx+aZOoO1Oc/C0lMZvjhp7nQzxVGc1eWuZNiqdohK X-Received: by 2002:aa7:d3d1:: with SMTP id o17mr17767539edr.200.1587966979867; Sun, 26 Apr 2020 22:56:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587966979; cv=none; d=google.com; s=arc-20160816; b=q4gA6yTMqN54HHaOddQmRVkzht/oCYIRewq4eu4YmxR/DSqBKlICwzFb8uHhqtdi+b eO4fJS43HlsuK8KrIu2gMebhtoP4YrD+70R6XrO8/qOT5OAbX8R4IkN1f0JjXWi3xzBF AnKWLfy2zJtSrEsUPIwPCPY2ajBpw3ZvQqBBhKl5oJLg5cjfHBO/sSiGO04VxwU2Mabm XVPD7mknPGBvAUp4O2XruCpsnTI6u2YRvYE0xfxeKqM7XHuVaMJmYKAwM8PJBjRK1qFZ naCQzWasxwVCgw0G2fef3Fs2q+BvCCqPOCnfKb0CbRENuRKrZpD38Ek/m+0nHsSwQgao /HEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=VIbo6voS8su7pBgW6QNQX9T1AnhQ/gr6+hSotvAjdrw=; b=Fm+Ht/mXYCPYBfcWMVYuwAXFyzj7HZH53W6S77Qho7T4qZ6fu8xb627+Kn6kXznk0E NKzAKMMQTlrxXP1rJnbZ4fDNDGCk8+RcrfX20GBjpXEVPH3pKNfF3LdaLsLIhotAB/VZ F+c+lwI1dGx8XNHDhqw7/+TtTJz1VeA0rHtayszVNKno9ZQRDMMpfi6GxJ6raXZt7du9 hejeLY4CHmWge63y5qZ0j/UDLsIGEaHJf1qowXXwJEcOw1+4ZC1Zl85VCKNeu4EWZzuT WmTOtpflGaqc5drU8yZucxO1FvOy10pQ4biOID55uc7b9iU35lO9AQO7f2LOrQC3vm8L iX4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=VNo0SLzA; 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 pv20si8327846ejb.295.2020.04.26.22.55.56; Sun, 26 Apr 2020 22:56:19 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=VNo0SLzA; 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 S1726572AbgD0Fy3 (ORCPT + 99 others); Mon, 27 Apr 2020 01:54:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726221AbgD0Fy3 (ORCPT ); Mon, 27 Apr 2020 01:54:29 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77E6BC061A0F; Sun, 26 Apr 2020 22:54:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VIbo6voS8su7pBgW6QNQX9T1AnhQ/gr6+hSotvAjdrw=; b=VNo0SLzA18Ne9P9sHHtq9QWzV/ caSidokmLnLyClnfmsnhtgIJ3o3r94Cw7yjxpQsHG0zgqqyoXWY0ew2Zn7vOtJYxKbNGRTeBgvTbn CgmwUIHiZy/D0rBviqHyNz5EW9BFpFAgfY5sB61+1xTN4KSIKmdyjkSIbHrDRbmbg0Ni95cNaWTCx 3uDFhtflbYzYcQNAfwjCa6xWCozXDEdvOamkrQg26/M/WNWOxh1/5wy8c63YA1dAAMbNy4vQA+40g cIOiVIElQnx/Oj1On16HRtNgcgQccVybdfcdccPDZmxjsrdMvpsNyVEMcVu3cRKH73BVRr+gzKdru ix92/ZvQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jSwiq-0005BE-Af; Mon, 27 Apr 2020 05:54:28 +0000 Date: Sun, 26 Apr 2020 22:54:28 -0700 From: Christoph Hellwig To: Dave Chinner Cc: Guoqing Jiang , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, hch@infradead.org, willy@infradead.org, Chris Mason , Josef Bacik , David Sterba , linux-btrfs@vger.kernel.org Subject: Re: [RFC PATCH 3/9] btrfs: use set/clear_fs_page_private Message-ID: <20200427055428.GB16709@infradead.org> References: <20200426214925.10970-1-guoqing.jiang@cloud.ionos.com> <20200426214925.10970-4-guoqing.jiang@cloud.ionos.com> <20200426222054.GA2005@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200426222054.GA2005@dread.disaster.area> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 27, 2020 at 08:20:54AM +1000, Dave Chinner wrote: > > void set_page_extent_mapped(struct page *page) > > { > > - if (!PagePrivate(page)) { > > - SetPagePrivate(page); > > - get_page(page); > > - set_page_private(page, EXTENT_PAGE_PRIVATE); > > - } > > + if (!PagePrivate(page)) > > + set_fs_page_private(page, (void *)EXTENT_PAGE_PRIVATE); > > Change the definition of EXTENT_PAGE_PRIVATE so the cast is not > needed? Nothing ever reads EXTENT_PAGE_PRIVATE; it's only there to > set the private flag for other code to check and release the extent > mapping reference to the page... IIRC there as a patch on the btrfs list to remove EXTENT_PAGE_PRIVATE, it might be better to not bother changing it. Maybe the btrfs maintainers remember this better.