On Fri, Jan 27, 2023 at 04:13:37PM +0000, Matthew Wilcox wrote: > > It's out of scope for _this_ patchset. I think it's a patchset that > could come either before or after, and is needed to support large folios > with ext4. The biggest problem with doing that conversion is that > bounce pages are allocated from a mempool which obviously only allocates > order-0 folios. I don't know what to do about that. Have a mempool > for each order of folio that the filesystem supports? Try to allocate > folios without a mempool and then split the folio if allocation fails? > Have a mempool containing PMD-order pages and split them ourselves if > we need to allocate from the mempool? > > Nothing's really standing out to me as the perfect answer. There are > probably other alternatives. Hmm.... should we have some kind of check in case a large folio is passed to these fscrypt functions? (e.g., some kind of BUG_ON, or WARN_ON?) Or do we just rely on people remembering that when we start trying to support large folios for ext4, it will probably have to be the easy cases first (e.g., no fscrypt, no fsverity, block size == page size)? - Ted