[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <810722.1623834960@warthog.procyon.org.uk>
Date: Wed, 16 Jun 2021 10:16:00 +0100
From: David Howells <dhowells@...hat.com>
To: "Matthew Wilcox (Oracle)" <willy@...radead.org>
Cc: dhowells@...hat.com, akpm@...ux-foundation.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Vlastimil Babka <vbabka@...e.cz>,
William Kucharski <william.kucharski@...cle.com>,
Christoph Hellwig <hch@....de>
Subject: Re: [PATCH v11 32/33] fs/netfs: Add folio fscache functions
Matthew Wilcox (Oracle) <willy@...radead.org> wrote:
> /**
> - * set_page_fscache - Set PG_fscache on a page and take a ref
> - * @page: The page.
> + * folio_start_fscache - Start an fscache operation on a folio.
> + * @folio: The folio.
> *
> - * Set the PG_fscache (PG_private_2) flag on a page and take the reference
> - * needed for the VM to handle its lifetime correctly. This sets the flag and
> - * takes the reference unconditionally, so care must be taken not to set the
> - * flag again if it's already set.
> + * Call this function before an fscache operation starts on a folio.
> + * Starting a second fscache operation before the first one finishes is
> + * not allowed.
That's not correct. It's only used for operations that write from the page to
disk. Operations that read into the page are covered by the page lock.
> + * folio_end_fscache - End an fscache operation on a folio.
> ...
> + * Call this function after an fscache operation has finished. This will
> + * wake any sleepers waiting on this folio.
Ditto.
> + * folio_wait_fscache - Wait for an fscache operation on this folio to end.
> + * @folio: The folio.
> *
> + * If an fscache operation is in progress on this folio, wait for it to
> + * finish. Another fscache operation may start after this one finishes,
> + * unless the caller holds the folio lock.
Ditto.
Apart from that, it looks okay.
David
Powered by blists - more mailing lists