Re: [PATCH v11 32/33] fs/netfs: Add folio fscache functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx> 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





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux