lkml.org 
[lkml]   [2020]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 11/25] fs: Make page_mkwrite_check_truncate thp-aware
On Thu, Feb 13, 2020 at 06:44:19PM +0300, Kirill A. Shutemov wrote:
> On Tue, Feb 11, 2020 at 08:18:31PM -0800, Matthew Wilcox wrote:
> > From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> >
> > If the page is compound, check the appropriate indices and return the
> > appropriate sizes.
>
> Is it guarnteed that the page is never called on tail page?

I think so. page_mkwrite_check_truncate() is only called on pages
which belong to a particular filesystem. Only filesystems which have
the FS_LARGE_PAGES flag set will have compound pages allocated in the
page cache for their files. As filesystems are converted, they will
only see large head pages.

I'll happily put in a VM_BUG_ON(PageTail(page), page); to ensure we
don't screw that up.

\
 
 \ /
  Last update: 2020-02-13 17:27    [W:0.092 / U:4.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site