[Bug 218932] New: Serious problem with ext4 with all kernels, auto-commits do not settle to block device

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

 



https://bugzilla.kernel.org/show_bug.cgi?id=218932

            Bug ID: 218932
           Summary: Serious problem with ext4 with all kernels,
                    auto-commits do not settle to block device
           Product: File System
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: ext4
          Assignee: fs_ext4@xxxxxxxxxxxxxxxxxxxx
          Reporter: sirius@xxxxxxxxxxxxx
        Regression: No

Tested in kernel 5.11, 6.1, 6.8
Some writes to ext4 (default commit=5) do not commit to block device in more
than 25 seconds.

How to reproduce:
apt install php-cli -y
Instead of iostat create io watcher, that shows real writes to block device in
Mb every second:
show_writes.php
=================================
#!/usr/bin/php
<?php
if(!isset($argv[1])) die("provide device\n");
if(!($device = realpath($argv[1]))) die("can't realpath device\n");
if(!preg_match("@[^/]+$@", $device, $m)) die();
$device = $m[0];
$prev = 0;
while(1) {
        $data = preg_split("/\s+/",
trim(file_get_contents("/sys/block/$device/stat")));
        if(empty($data)) die("can't get device info");
        if($prev) echo date("h:i:s")."
".number_format(($data[6]-$prev)*512/1024/1024,2)." M\n";
        $prev = $data[6];
        sleep(1);
}
=================================
Add free HDD/partition of 20Mb+ size (/dev/vdb)
In first console run:
php show_writes.php /dev/vdb

In second console run:
mkfs.ext4 -E lazy_itable_init=0 -E lazy_journal_init=0 /dev/vdb
mount /dev/vdb /mnt/

rm -f /mnt/test; sync; sleep 1; date && dd if=/dev/urandom of=/mnt/test bs=1M
count=10
# watch that 10Mb write has settled in 5 seconds, good
rm -f /mnt/test; sync; sleep 1; date && dd if=/dev/urandom of=/mnt/test bs=1M
count=10
# watch, that second 10Mb write does not commit to block device in more than 25
seconds, but should in 5 seconds, repeat if did.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux