On Tue, Aug 13, 2019 at 09:03:59PM -0400, Jeff Mahoney wrote: > It's theoretically possible to add multiple devices with sizes that add up > to or exceed 16EiB. A file system will be created successfully but will > have a superblock with incorrect values for total_bytes and other fields. > > Kernels up to v5.0 will crash when they encounter this scenario. > > We need to check for overflow and reject the device if it would overflow. > I've copied include/linux/overflow.h from the kernel to reuse that code. > > Link: https://bugzilla.suse.com/show_bug.cgi?id=1099147 > Signed-off-by: Jeff Mahoney <jeffm@xxxxxxxx> > --- > common/device-scan.c | 15 +- > kernel-lib/overflow.h | 270 ++++++++++++++++++++++ > tests/mkfs-tests/018-multidevice-overflow/test.sh | 22 ++ I've split that to 3 patches as each does something else.
