Re: [PATCH v2 0/4] mtd: block2mtd: convert to folios
From: Miquel Raynal
Date: Tue Nov 17 2026 - 08:37:14 EST
On Fri, 16 Oct 2026 15:11:06 -0400, Tal Zussman wrote:
> block2mtd still goes through the page wrappers around the folio page
> cache API, each of which hides a compound_head() call. Convert the read,
> write and erase paths to use folios directly. This removes a
> compound_head() call per page in the read path and four per page in the
> write and erase paths, and leaves the driver with no struct page usage.
>
> The first patch fixes a pre-existing race in the write and erase paths,
> which could modify a page that invalidate_bdev() had already dropped
> from the page cache.
>
> [...]
Applied to mtd/next, thanks!
[1/4] mtd: block2mtd: retry if the page was dropped from the page cache
commit: 49fb19b1578425c1fa35f305f5adb4f8a5d35063
[2/4] mtd: block2mtd: convert block2mtd_read() to folios
commit: ab602490225503d68d5d251e5cfcc74673ea382e
[3/4] mtd: block2mtd: convert _block2mtd_write() to folios
commit: 6ab57a6b78dfcbff8cb5f481d0a8a04785f57326
[4/4] mtd: block2mtd: convert _block2mtd_erase() to folios
commit: 784ec89f3b6a28f78e66602f9d08d4ba7dd574f9
Patche(s) should be available on mtd/linux.git and will be
part of the next PR (provided that no robot complains by then).
Kind regards,
Miquèl