Re: [PATCH 2/2] exfat: take bitmap_lock at the start of exfat_alloc_cluster()

From: David Timber

Date: Mon Sep 07 2026 - 20:54:10 EST


On 9/7/26 08:04, Chi Zhiling wrote:
[...]
>
> You mean one user has changed the fs, and others see the stale value
> of used_clusters?
>
> For SMP (including NUMA), if a certain CPU changes the value of
> used_clusters, then the caches of all other CPUs will be invalidated
> and need to be refilled. This process is completed by the hardware,
> see MESI protocol.
My bad for taking NUMA as an example. I was just curious as to what you
might have to say on this since the fix is kinda related to your patch.

I was just pointing out that there's a minor race condition in
exfat_statfs(). I used NUMA as an example because the delay through the
interconnect would make the cache coherency problem worse. btw, I think
the MESI protocol only covers cache. It has no control over the
execution flow of processors.

I might have an access to a real NUMA hardware that I can test my
reproducer on. I'll report back with a patch if I can actually reproduce
it. Thanks anyways.

Davo