Re: [RFC PATCH v15 03/10] ocfs2: add ocfs2_get_clusters_uncached()
From: Christoph Hellwig
Date: Wed Dec 02 2026 - 11:16:27 EST
On Wed, Dec 02, 2026 at 10:35:00PM +0800, Joseph Qi wrote:
> From: Heming Zhao <heming.zhao@xxxxxxxx>
>
> ocfs2_get_clusters() consults the extent map cache, which merges adjacent
> on-disk records into one. A caller that needs to operate on one on-disk
> record at a time cannot use it: the returned range may span several
> records, and inserting the lookup result back into the cache is not
> wanted either.
>
> Factor the lookup into __ocfs2_get_clusters() with a cache flag and add
> ocfs2_get_clusters_uncached(), which reads the extent tree directly and
> leaves the cache alone. ocfs2_get_clusters() keeps its current behaviour.
A little note why someone might want to bypass the cache might be
useful for the uninitiated reader (i.e., me).
But otherwise this looks good:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>