Re: [PATCH v2 2/3] ntfs: avoid heap allocation for free-cluster readahead state

From: CharSyam

Date: Thu May 21 2026 - 09:23:02 EST


Hi Namjae,

Thanks for testing it.

It built successfully on my local setup with gcc 13.3.0
(gcc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0). I tested it on top of
mainline commit 8bc67e4db64a with CONFIG_NTFS_FS=m using:

make O=/tmp/linux-ntfs-mainline-v2-build fs/ntfs/super.o
make O=/tmp/linux-ntfs-mainline-v2-build fs/ntfs/ntfs.ko

However, I found a portability issue in patch 2. I used:

struct file_ra_state ra = {};

which gcc accepted here, but this can be rejected by stricter builds as
an empty initializer. I changed it to:

struct file_ra_state ra = { 0 };

and re-tested patch 2 alone and patches 1-2 on a clean mainline tree;
both build fs/ntfs/super.o successfully. The full series also builds
fs/ntfs/ntfs.ko.

I will send v3 with this fix. If your build error is different from the
empty-initializer issue, could you please share the exact error log?

Thanks,
DaeMyung

2026년 5월 21일 (목) 오후 9:19, Namjae Jeon <linkinjeon@xxxxxxxxxx>님이 작성:
>
> > /*
> > * Convert the number of bits into bytes rounded up, then convert into
> > @@ -1985,7 +1981,7 @@ s64 get_nr_free_clusters(struct ntfs_volume *vol)
> > * Get folio from page cache, getting it from backing store
> > * if necessary, and increment the use count.
> > */
> > - folio = ntfs_get_locked_folio(mapping, index, max_index, ra);
> > + folio = ntfs_get_locked_folio(mapping, index, max_index, &ra);
> This patch causes a build error when applied. Does it build
> successfully for you?