On Mon, Jun 14, 2021 at 01:25:32PM +0100, David Howells wrote:
> +     /* Full page write */
> +     if (offset == 0 && len >= thp_size(page))
> +             return true;
> +
> +     /* pos beyond last page in the file */
> +     if (pos - offset >= i_size)
> +             goto zero_out;
> +
> +     /* Write that covers from the start of the page  to EOF or beyond */

spurious double space between page and to.

> @@ -1090,13 +1119,8 @@ int netfs_write_begin(struct file *file, struct 
> address_space *mapping,
>        * within the cache granule containing the EOF, in which case we need
>        * to preload the granule.
>        */
> -     size = i_size_read(inode);
>       if (!ops->is_cache_enabled(inode) &&
> -         ((pos_in_page == 0 && len == thp_size(page)) ||
> -          (pos >= size) ||
> -          (pos_in_page == 0 && (pos + len) >= size))) {
> -             netfs_clear_thp(page);
> -             SetPageUptodate(page);
> +         netfs_prep_noread_page(page, pos, len)) {

I don't like the name ... netfs_skip_page_read()?

--
Linux-cachefs mailing list
Linux-cachefs@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-cachefs

Reply via email to