[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200427122740.GZ18421@twin.jikos.cz>
Date: Mon, 27 Apr 2020 14:27:41 +0200
From: David Sterba <dsterba@...e.cz>
To: Christoph Hellwig <hch@...radead.org>
Cc: Dave Chinner <david@...morbit.com>,
Guoqing Jiang <guoqing.jiang@...ud.ionos.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
willy@...radead.org, Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>, linux-btrfs@...r.kernel.org
Subject: Re: [RFC PATCH 3/9] btrfs: use set/clear_fs_page_private
On Sun, Apr 26, 2020 at 10:54:28PM -0700, Christoph Hellwig wrote:
> 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.
The patch removing it is part of patchset adding full iomap support to
btrfs,
(https://lore.kernel.org/linux-btrfs/20190905150650.21089-4-rgoldwyn@suse.de/)
but it'll still take some time so I'm OK with using the
set_fs_page_private helper and adding the cast to EXTENT_PAGE_PRIVATE
definition.
Powered by blists - more mailing lists