How to reproduce (I tested in Fedora 36 (kernel 5.19.2) and also on rawhide 6.1): 2. mkfs.btrfs over a partition. 3. mount -o lazytime,noatime 4. touch file.dat 5. chattr +C file.dat # turns off compression, checksumming and COW 6. fallocate -l1G file.dat 7. # prefill the file with random data fio -ioengine=psync -name=test -bs=1M -rw=write -filename=file.dat 8. fio -ioengine=psync -sync=1 -direct=1 -name=test -bs=4k -rw=randwrite -runtime=60 -filename=file.dat # Will show, say, 2K IOPs 9. fio -ioengine=io_uring -sync=1 -direct=1 -name=test -bs=4k -rw=randwrite -runtime=60 -filename=file.dat # Will show, say, 32K IOPs 10. fio -ioengine=libaio -sync=1 -direct=1 -name=test -bs=4k -rw=randwrite -runtime=60 -filename=file.dat # Will show, say, 32K IOPs Steps 9 and 10 show implausible IOPs. This does not happen on, say, Ext4 (all the methods give roughly the same IOPs). Removing -sync=1 on all engines on Ext4 gives immediate return (as expected because everything gets merged and finally written very fast) Adding/Removing -sync=1 with io_uring or libaio changes nothing on BTRFS (it's definitely a bug) I consider it's a bug in BTRFS. Very important bug because BTRFS becomes default FS in Fedora server/desktop now. This bug may cause data loss. That's why I set this bug as high priority.
https://bugzilla.kernel.org/show_bug.cgi?id=216408- I made the same bug report here.
Does this reproduce on a 6.0 or 6.1 kernel? e.g. kernel 6.0.5 is available in koji for f35, f36, f37: https://koji.fedoraproject.org/koji/packageinfo?packageID=8 pick the release version then pick the kernel files for your architecture: kernel, kernel-core, kernel-modules are usually all that's needed; then cd to the download directory and 'dnf install *rpm'
Also, ideally btrfs bugs get reported in both rhbz (for attachments and tracking patches if needed), and also the upstream mailing list: https://btrfs.wiki.kernel.org/index.php/Btrfs_mailing_list Not much of the kernel is actually tracked on the kernel.org bugzilla these days :\ But also the upstream list will usually want to know if the problem happens with most recent stable (6.0 series) or mainline (6.1 series).
I have checked on rawhide's kernel 6.1.0-0.rc2.21.fc38.x86_64 Bug is till triggered.
Yeah, me neither! any updates?
Upstream thread https://lore.kernel.org/linux-btrfs/CAL3q7H7RmDV2Xe2+Fb11Jr=NqPWQtw9V=En6JR1swS6Ocr5Z-w@mail.gmail.com/T/#t
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8184620ae21213d51eaf2e0bd4186baacb928172