
On 2020/11/2 上午8:20, Qu Wenruo wrote:
On 2020/11/2 上午7:02, Marek Behun wrote:
On Sat, 31 Oct 2020 09:07:50 +0800 Qu Wenruo wqu@suse.com wrote:
In real world, this should not cause problem as we have device number limit thus it won't go beyond 4G for a single stripe.
So we can't run into this overflow in U-Boot because only one device is supported? But in Linux we can run into this issue?
In kernel, we have device number check, IIRC for default nodesize is just several donzens of devices. And since each stripe is only 64K fixed in btrfs, you can see it won't go beyond 4G even in kernel.
Sorry, the 64K stripe_len is only for RAID56, and for kernel, we always use u64 for stripe_len, thus we won't hit the problem.
The problem is in btrfs-progs, where the code comes from, we use int, other than u64.
Thanks for the hint for the root cause, would related values to be u64 for both btrfs-progs and u-boot to follow the kernel scheme.
Thanks, Qu
Thanks, Qu