On Fri, Mar 15, 2024 at 12:14:05PM +1100, Dave Chinner wrote: > On Thu, Mar 14, 2024 at 05:12:22PM -0700, Luis Chamberlain wrote: > > Joining two 8 EB files with device-mapper seems allowed: > > > > truncate -s 8EB /mnt-pmem/sparse-8eb.1; losetup /dev/loop1 /mnt-pmem/sparse-8eb.1 > > truncate -s 8EB /mnt-pmem/sparse-8eb.2; losetup /dev/loop2 /mnt-pmem/sparse-8eb.2 > > > > cat /home/mcgrof/dm-join-multiple.sh > > #!/bin/sh > > # Join multiple devices with the same size in a linear form > > # We assume the same size for simplicity > > set -e > > size=`blockdev --getsz $1` > > FILE=$(mktemp) > > for i in $(seq 1 $#) ; do > > offset=$(( ($i -1) * $size)) > > echo "$offset $size linear $1 0" >> $FILE > > shift > > done > > cat $FILE | dmsetup create joined > > rm -f $FILE > > > > /home/mcgrof/dm-join-multiple.sh /dev/loop1 /dev/loop2 > > > > And mkfs.xfs seems to go through on them, ie, its not rejected > > Ah, I think mkfs.xfs has a limit of 8EiB on image files, maybe not > on block devices. What's the actual limit of block device size on > Linux? We can't seek past 2^63-1. That's the limit on lseek, llseek, lseek64 or whatever we're calling it these days. If we're missing a check somewhere, that's a bug.