linux-unionfs mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Lukasz Okraszewski <Lukasz.Okraszewski@arm.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	 Matthew Clarkson <Matthew.Clarkson@arm.com>,
	Brandon Jones <Brandon.Jones@arm.com>, nd <nd@arm.com>,
	 overlayfs <linux-unionfs@vger.kernel.org>
Subject: Re: [overlay] [fuse] Potential bug with large file support for FUSE based lowerdir
Date: Wed, 31 Jan 2024 20:49:04 +0100	[thread overview]
Message-ID: <CAJfpegvBc+Md51ubYv9iDnST+Xps9P=g51NcWJONKy4fq=O8+Q@mail.gmail.com> (raw)
In-Reply-To: <VI1PR08MB31011DF4722B9E720A251892827C2@VI1PR08MB3101.eurprd08.prod.outlook.com>

On Wed, 31 Jan 2024 at 17:38, Lukasz Okraszewski
<Lukasz.Okraszewski@arm.com> 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

       reply	other threads:[~2024-01-31 19:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <VI1PR08MB31011DF4722B9E720A251892827C2@VI1PR08MB3101.eurprd08.prod.outlook.com>
2024-01-31 19:49 ` Miklos Szeredi [this message]
2024-02-01  8:01   ` [overlay] [fuse] Potential bug with large file support for FUSE based lowerdir Lukasz Okraszewski
2024-02-01  8:23     ` Miklos Szeredi
2024-02-01  9:24       ` Lukasz Okraszewski
2024-02-01  9:28         ` Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJfpegvBc+Md51ubYv9iDnST+Xps9P=g51NcWJONKy4fq=O8+Q@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=Brandon.Jones@arm.com \
    --cc=Lukasz.Okraszewski@arm.com \
    --cc=Matthew.Clarkson@arm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-unionfs@vger.kernel.org \
    --cc=nd@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).