Re: [PATCH v2 4/9] exfat: add support for multi-cluster allocation
From: Namjae Jeon
Date: Sun May 10 2026 - 20:21:00 EST
> > diff --git a/fs/exfat/inode.c b/fs/exfat/inode.c
> > index 1246713567a5..7b09d94ac464 100644
> > --- a/fs/exfat/inode.c
> > +++ b/fs/exfat/inode.c
> > @@ -137,9 +137,9 @@ static int exfat_map_cluster(struct inode *inode, unsigned int clu_offset,
> > unsigned int num_to_be_allocated = 0, num_clusters;
> >
> > num_clusters = exfat_bytes_to_cluster(sbi, exfat_ondisk_size(inode));
> > -
> > - if (clu_offset >= num_clusters)
> > - num_to_be_allocated = clu_offset - num_clusters + 1;
> > + if (clu_offset > num_clusters ||
> > + *count > num_clusters - clu_offset)
> > + num_to_be_allocated = clu_offset + *count - num_clusters;
>
> We need to truncate *count for read operations so that it does not
> extend beyond EOF. Otherwise, xfstests generic/003 will fail.
I'm not seeing this failure... Can you elaborate more why it was
failing on your side ?