Re: [RFC PATCH 2/5] mm: Switch mapping to device mapping
From: Matthew Wilcox <willy@infradead.org>
Date: 2021-10-23 01:37:29
Also in:
linux-btrfs
From: Matthew Wilcox <willy@infradead.org>
Date: 2021-10-23 01:37:29
Also in:
linux-btrfs
On Fri, Oct 22, 2021 at 03:15:02PM -0500, Goldwyn Rodrigues wrote:
Get the device offset and last_index from the filesystem and read it from the device directly. If the device page(s) have been read before, it can be picked up directly for reads. If not the page is read from the device. The page would be added to device's mapping instead of the file.
I really don't like this way of doing it. Why doesn't the filesystem choose where it's going to cache the data and call filemap_readpage on that inode, instead of having the generic code call back into the filesystem to decide where to cache the data? You know that it's a shared extent before you call into filemap_read(), so you know it shouldn't be cached in the local inode.