linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Major bug in BTRFS (syncs are ignored with libaio or io_uring)
@ 2022-10-27 21:21 Марк Коренберг
  2022-10-28  4:30 ` Andrei Borzenkov
  2022-10-28 10:23 ` Filipe Manana
  0 siblings, 2 replies; 5+ messages in thread
From: Марк Коренберг @ 2022-10-27 21:21 UTC (permalink / raw)
  To: linux-btrfs

How to reproduce (I tested in kernel 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.redhat.com/show_bug.cgi?id=2117971
*****************


-- 
Segmentation fault

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-11-11 12:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27 21:21 Major bug in BTRFS (syncs are ignored with libaio or io_uring) Марк Коренберг
2022-10-28  4:30 ` Andrei Borzenkov
2022-10-28  4:48   ` Марк Коренберг
2022-10-28 10:23 ` Filipe Manana
2022-11-11 12:01   ` Filipe Manana

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 NNTP newsgroup(s).