Re: [RFC PATCH v2 5/8] fat: drop ->write_begin() and ->write_end() usage from fat_cont_expand()
From: Matheus Alves de Almeida
Date: Sun Nov 29 2026 - 20:23:18 EST
On Fri, Nov 20, 2026 at 07:31:42PM +0100, Christoph Hellwig wrote:
>On Tue, Nov 17, 2026 at 11:01:45PM -0300, Matheus Alves de Almeida wrote:
>> + while (pos < new_size) {
>> + index = pos >> PAGE_SHIFT;
>> +
>> + folio = __filemap_get_folio(mapping, index, FGP_LOCK | FGP_CREAT,
>> + mapping_gfp_mask(mapping));
>
>This code would benefit a lot from moving the per-folio logic into
>a helper.
That's true, thanks.
>And given that all of the code until marking the folio dirty
>is entirely generic, can we have it in common code? Did this get copied
>from somewhere else or are there other obvious users that can share the
>code?
>
I didn't copy it from anywhere and I couldn't find another filesystem
doing the same thing. I could make this generic if desired, although it
would be limited to fat only for now.
Thanks,
Matheus