From mboxrd@z Thu Jan 1 00:00:00 1970 From: Qu Wenruo Date: Mon, 2 Nov 2020 08:20:11 +0800 Subject: [PATCH 2/4] fs: btrfs: volumes: prevent overflow for multiplying In-Reply-To: <20201102000256.6ca75cb9@nic.cz> References: <20201031010752.23974-1-wqu@suse.com> <20201031010752.23974-3-wqu@suse.com> <20201102000256.6ca75cb9@nic.cz> Message-ID: <405beba4-a461-41ad-9da7-809498cb6e16@suse.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 2020/11/2 ??7:02, Marek Behun wrote: > On Sat, 31 Oct 2020 09:07:50 +0800 > Qu Wenruo 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. Thanks, Qu