> Trying the reproducer, at least on a 5.0 kernel, does never fail on a > pwrite for me, but always on fallocate: [...] > So either that was tested on a rather old kernel or: > > 1) we had snapshotting happening between a fallocate and a pwrite (or > at the same time as the pwrite) > 2) before the pwrite (or during) the unwritten/prealloc extent was > reflinked (cp --reflink, clone or dedupe ioctls)
I am at Linux 5.0.4-200.fc29.x86_64, the user in the github ticket is at Linux 5.0.7-arch1-1-ARCH, so pretty recent. There should be no snapshot or reflink or really any other activity on the test filesystem. Maybe the difference is that I am testing on a file and you on a raw block device? This is how things look at 4GB size: $ dd if=/dev/zero of=img bs=1M count=5000 $ mkfs.btrfs -f -b $((4 * 1024 * 1024 * 1024)) img $ mkdir mnt $ sudo mount img mnt $ sudo chmod 777 mnt $ cd mnt $ ../fallocate_write/fallocate_write reading from /dev/urandom writing to ./blob.qEaSZl writing blocks of 132096 bytes each total 125 MiB, 162.06 MiB/s total 251 MiB, 162.92 MiB/s pwrite failed: No space left on device Is your /dev/sdi an SSD? I noticed that mkfs.btrfs does NOT think that the disk image file is an SSD, despite the file residing on an SSD. Thanks, Jakob