Re: [PATCH v2 10/13] exfat: support multi-cluster for exfat_map_cluster
From: Yuezhang.Mo@xxxxxxxx
Date: Tue Jan 13 2026 - 01:38:20 EST
> @@ -281,7 +285,7 @@ static int exfat_get_block(struct inode *inode, sector_t iblock,
> sec_offset = iblock & (sbi->sect_per_clus - 1);
>
> phys = exfat_cluster_to_sector(sbi, cluster) + sec_offset;
> - mapped_blocks = sbi->sect_per_clus - sec_offset;
> + mapped_blocks = (count << sbi->sect_per_clus_bits) - sec_offset;
This left shift will cause an overflow if the file is larger than 2TB
and the clusters are contiguous.
The others look good.
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@xxxxxxxx>