Re: [overlay] [fuse] Potential bug with large file support for FUSE based lowerdir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 31 Jan 2024 at 17:38, Lukasz Okraszewski
<Lukasz.Okraszewski@xxxxxxx> wrote:
>
> Hello all,
>
> I have stumbled into what I suspect may be a bug in the overlayfs/fuse stack.
>
> The repro script looks like this:
> ```sh
> #!/bin/bash
>
> set -xe
>
> for i in large1 large2;
> do
>   if [ -f $i.squashfs ]; then
>     continue
>   fi
>   mkdir -p $i
>   pushd $i || exit 1
>   yes $i | head -c 4GB > test.file
>   popd || exit 1
>   mksquashfs $i $i.squashfs
> done
>
> rm -rf work
> mkdir -p work/{lower0,lower1,lower2,upper,work,mnt}
>
> squashfuse -o allow_other large1.squashfs work/lower1
> squashfuse -o allow_other large2.squashfs work/lower2
>
> trap "set +e; fusermount -u $(realpath work/lower1); fusermount -u $(realpath work/lower2); sudo umount --verbose -l $(realpath work/mnt)" EXIT
>
> sudo mount \
>   -t overlay \
>   -o lowerdir=work/lower2:work/lower1:work/lower0,upperdir=work/upper,workdir=work/work\
>   overlay \
>   work/mnt
>
> pushd work/mnt
> dd if=/dev/zero of=test.file bs=4k count=80
> popd
> ```
>
> When writing to the file I see the following error:
> ```
> test.file: Value too large for defined data type
> ```
>
> The file can be read just fine, stat works.
> Mounting the squashfs with sudo and a loop device does not have this problem.
>
> Now, dmesg shows:
> ```
> [Jan31 08:38] overlayfs: failed to retrieve lower fileattr (/test.file, err=-75)

So this is a FUSE_IOCTL/FS_IOC_GETFLAGS request for which the server
replies with EOVERFLOW.  This looks like a server issue, but it would
be good to see the logs and/or strace related to this particular
request.

Thanks,
Miklos




[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux