Re: [PATCH 18/37] ext4: Convert ext4 to read_folio

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

 



On Mon, May 09, 2022 at 09:30:52AM -0400, Theodore Ts'o wrote:
> On Sun, May 08, 2022 at 09:31:12PM +0100, Matthew Wilcox (Oracle) wrote:
> > This is a "weak" conversion which converts straight back to using pages.
> > A full conversion should be performed at some point, hopefully by
> > someone familiar with the filesystem.
> 
> What worries me about the "weak" conversion is that ext4_read_folio()
> (formerly ext4_read_page()) is going to completely the wrong thing if
> the folio contains more than a single page.  This seems to
> be... scary.  How are callers of aops->read_folio() supposed to know
> whether the right thing or the wrong thing will happen if a random
> folio is passed to aops->read_folio()?

I'm probably answering these emails out of order, but the page
cache is absolutely not supposed to be creating large folios for
filesystems that haven't indicated their support for such by calling
mapping_set_large_folios().  We could assert that in every filesystem,
but it's on the same scale as asserting that page (or folio) != NULL
and page->mapping != NULL.  Filesystems should trust the VFS to obey
its rules.  Obviously this is a new rule, so people aren't as familiar
with it as "you can rely on the page to not be truncated while we're
calling readpage" or "the page is locked on entry to these aops".



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

  Powered by Linux