-
Couldn't load subscription status.
- Fork 1.1k
Description
Recently, I ran the LTP on a Raspberry Pi 4 using Linux 6.18.0-rc2 and encountered the io_control01 test failure. Specifically, there was no increment in the wbytes counter for ext3 and ext4 filesystems. The error log is as follows:
tst_tmpdir.c:316: TINFO: Using /tmp/ltp-mXrdeAyv7D/LTP_io_srcLbw as tmpdir (tmpfs filesystem)
tst_device.c:96: TINFO: Found free device 0 '/dev/loop0'
tst_test.c:1900: TINFO: LTP version: 20250130
tst_test.c:1904: TINFO: Tested kernel: 6.12.33-yocto-standard #1 SMP PREEMPT Thu Jun 19 20:22:28 UTC 2025 aarch64
tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
tst_test.c:1722: TINFO: Overall timeout per run is 0h 00m 30s
tst_supported_fs_types.c:97: TINFO: Kernel supports ext2
tst_supported_fs_types.c:62: TINFO: mkfs.ext2 does exist
tst_supported_fs_types.c:97: TINFO: Kernel supports ext3
tst_supported_fs_types.c:62: TINFO: mkfs.ext3 does exist
tst_supported_fs_types.c:97: TINFO: Kernel supports ext4
tst_supported_fs_types.c:62: TINFO: mkfs.ext4 does exist
tst_supported_fs_types.c:128: TINFO: Filesystem xfs is not supported
tst_supported_fs_types.c:97: TINFO: Kernel supports btrfs
tst_supported_fs_types.c:58: TINFO: mkfs.btrfs does not exist
tst_supported_fs_types.c:105: TINFO: Skipping bcachefs because of FUSE blacklist
tst_supported_fs_types.c:97: TINFO: Kernel supports vfat
tst_supported_fs_types.c:62: TINFO: mkfs.vfat does exist
tst_supported_fs_types.c:128: TINFO: Filesystem exfat is not supported
tst_supported_fs_types.c:169: TINFO: Skipping ntfs as requested by the test
tst_supported_fs_types.c:169: TINFO: Skipping tmpfs as requested by the test
tst_test.c:1833: TINFO: === Testing on ext2 ===
tst_test.c:1170: TINFO: Formatting /dev/loop0 with ext2 opts='' extra opts=''
mke2fs 1.47.1 (20-May-2024)
tst_test.c:1182: TINFO: Mounting /dev/loop0 to /tmp/ltp-mXrdeAyv7D/LTP_io_srcLbw/mnt fstyp=ext2 flags=0
io_control01.c:95: TPASS: Did some IO in the IO controller
io_control01.c:111: TPASS: Found 7:0 in io.stat
io_control01.c:112: TPASS: Expect: (rbytes=55296) > (st_rbytes=0)
io_control01.c:115: TPASS: Expect: (wbytes=6144) > (st_wbytes=0)
io_control01.c:118: TPASS: Expect: (rios=43) > (st_rios=0)
io_control01.c:121: TPASS: Expect: (wios=10) > (st_wios=0)
tst_test.c:1833: TINFO: === Testing on ext3 ===
tst_test.c:1170: TINFO: Formatting /dev/loop0 with ext3 opts='' extra opts=''
mke2fs 1.47.1 (20-May-2024)
tst_test.c:1182: TINFO: Mounting /dev/loop0 to /tmp/ltp-mXrdeAyv7D/LTP_io_srcLbw/mnt fstyp=ext3 flags=0
io_control01.c:67: TINFO: Found 7:0 in io.stat
io_control01.c:95: TPASS: Did some IO in the IO controller
io_control01.c:111: TPASS: Found 7:0 in io.stat
io_control01.c:112: TPASS: Expect: (rbytes=111616) > (st_rbytes=55296)
io_control01.c:115: TFAIL: Expect: (wbytes=6144) > (st_wbytes=6144)
io_control01.c:118: TPASS: Expect: (rios=87) > (st_rios=43)
io_control01.c:121: TFAIL: Expect: (wios=10) > (st_wios=10)
tst_test.c:1833: TINFO: === Testing on ext4 ===
tst_test.c:1170: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
mke2fs 1.47.1 (20-May-2024)
tst_test.c:1182: TINFO: Mounting /dev/loop0 to /tmp/ltp-mXrdeAyv7D/LTP_io_srcLbw/mnt fstyp=ext4 flags=0
io_control01.c:67: TINFO: Found 7:0 in io.stat
io_control01.c:95: TPASS: Did some IO in the IO controller
io_control01.c:111: TPASS: Found 7:0 in io.stat
io_control01.c:112: TPASS: Expect: (rbytes=136192) > (st_rbytes=111616)
io_control01.c:115: TFAIL: Expect: (wbytes=6144) > (st_wbytes=6144)
io_control01.c:118: TPASS: Expect: (rios=97) > (st_rios=87)
io_control01.c:121: TFAIL: Expect: (wios=10) > (st_wios=10)
tst_test.c:1833: TINFO: === Testing on vfat ===
tst_test.c:1170: TINFO: Formatting /dev/loop0 with vfat opts='' extra opts=''
tst_test.c:1182: TINFO: Mounting /dev/loop0 to /tmp/ltp-mXrdeAyv7D/LTP_io_srcLbw/mnt fstyp=vfat flags=0
io_control01.c:67: TINFO: Found 7:0 in io.stat
io_control01.c:95: TPASS: Did some IO in the IO controller
io_control01.c:111: TPASS: Found 7:0 in io.stat
io_control01.c:112: TPASS: Expect: (rbytes=152576) > (st_rbytes=136192)
io_control01.c:115: TPASS: Expect: (wbytes=26624) > (st_wbytes=6144)
io_control01.c:118: TPASS: Expect: (rios=98) > (st_rios=97)
io_control01.c:121: TPASS: Expect: (wios=26) > (st_wios=10)
Summary:
passed 20
failed 4
broken 0
skipped 0
warnings 0
It appears that the fsync operations are not being captured by the cgroup, likely because the written data may still reside in the page cache. To verify this, I wrote a test to open the file with the O_DIRECT flag, which bypasses the cache. This approach produced the expected results. Additionally, I increased the write buffer size to ensure that the write operations would be captured by the cgroup, and the test passed successfully. Below are the changes and the corresponding log:
diff --git a/testcases/kernel/controllers/io/io_control01.c b/testcases/kernel/controllers/io/io_control01.c
index 93e6aed..86e35bd 100644
--- a/testcases/kernel/controllers/io/io_control01.c
+++ b/testcases/kernel/controllers/io/io_control01.c
@@ -77,7 +77,7 @@ static void run(void)
fd = SAFE_OPEN("mnt/dat", O_WRONLY | O_CREAT, 0600);
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < 1024; i++) {
SAFE_WRITE(SAFE_WRITE_ALL, fd, buf, pgsz);
SAFE_FSYNC(fd);
TST_EXP_PASS_SILENT(posix_fadvise(fd, pgsz * i, pgsz, POSIX_FADV_DONTNEED));
tst_tmpdir.c:316: TINFO: Using /tmp/LTP_io_OJSpPM as tmpdir (tmpfs filesystem)
tst_deviloop0: detected capacity change from 0 to 614400
ce.c:98: TINFO: Found free device 0 '/dev/loop0'
tst_test.c:2021: TINFO: LTP version: 20250930
tst_test.c:2024: TINFO: Tested kernel: 6.18.0-rc2-yocto-standard+ #1 SMP PREEMPT Thu Oct 23 10:20:34 CST 2025 aarch64
tst_kconfig.c:88: TINFO: Parsing kernel config '/proc/config.gz'
tst_test/dev/zero: Can't lookup blockdev
.c:1842: TINFO: Overall timeout per run is 0h 00m 30s
tst_supported_fs_types.c:98: TINFO: Kernel supports ext2
tst_supp/dev/zero: Can't lookup blockdev
orted_fs_types.c:63: TINFO: mkfs.ext2 does exist
tst_supported_fs_types.c:98: TINFO: Kernel supports ext3
tst_supp/dev/zero: Can't lookup blockdev
orted_fs_types.c:63: TINFO: mkfs.ext3 does exist
tst_supported_fs_types.c:98: TINFO: Kernel supports ext4
tst_supported_fs_types.c:63: TINFO: mkfs.ext4 does exist
tst_supported_fs_types.c:129: TINFO: Filesystem xfs is not supported
tst_supported_fs_types.c:98: TINFO: Kernel supports btrfs
tst_supported_fs_types.c:59: TINFO: mkfs.btrfs does no/dev/zero: Can't lookup blockdev
t exist
tst_supported_fs_types.c:106: TINFO: Skipping bcachefs because of FUSE blacklist
tst_supported_fs_types.c:98: TINFO: Kernel supports vfat
tst_supported_fs_types.c:63: TINFO: mkfs.vfat does exist
tst_supported_fs_types.c:129: TINFO: Filesystem exfat is not supported
tst_supported_fs_types.c:157: TINFO: Skipping ntfs as requested by the test
tst_supported_fs_types.c:157: TINFO: Skipping tmpfs as requested by the test
tst_test.c:1956: TINFO: === Testing on ext2 ===
tst_test.c:1280: TINFO: Formatting /dev/loop0 with ext2 opts='' extra opts=''
mke2fs 1.47.1 (20-May-2024)
operation not supported error, dev loop0, sector 614272 op 0x9:(WRITE_ZEROES) flags 0x20000800 phys_seg 0 prio class 2
tst_testEXT4-fs (loop0): mounting ext2 file system using the ext4 subsystem
.c:1292: TINFO: Mounting /dev/loop0 tEXT4-fs (loop0): mounted filesystem 1892086e-8f23-4239-aa9b-ec6b7ee17b34 r/w without journal. Quota mode: none.
o /tmp/LTP_io_OJSpPM/mnt fstyp=ext2 flags=0
io_control01.c:92: TPASS: DidEXT4-fs (loop0): unmounting filesystem 1892086e-8f23-4239-aa9b-ec6b7ee17b34.
some IO in the IO controller
io_control01.c:108: TPASS: Found 7:0 in io.stat
io_control01.c:109: TPASS: Expect: (rbytes=88064) > (st_rbytes=0)
io_control01.c:112: TPASS: Expect: (wbytes=2110464) > (st_wbytes=0)
io_control01.c:115: TPASS: Expect: (rios=40) > (st_rios=0)
io_control01.c:118: TPASS: Expect: (wios=3085) > (st_wios=0)
tst_test.c:1956: TINFO: === Testing on ext3 ===
tst_test.c:1280: TINFO: Formatting /dev/loop0 with ext3 opts='' extra opts=''
mke2fs 1.47.1 (20-May-2024)
tst_testEXT4-fs (loop0): mounting ext3 file system using the ext4 subsystem
.c:1292: TINFO: Mounting /dev/loop0 to /tmp/LTP_io_OJSpPM/mnt fstyp=ext3 flagEXT4-fs (loop0): mounted filesystem b1782c41-2105-4549-97ba-9f852d23287a r/w with ordered data mode. Quota mode: none.
s=0
io_control01.c:66: TINFO: Found 7:0 in io.stat
io_control01.c:92: TPASS: Did some IO in the EXT4-fs (loop0): unmounting filesystem b1782c41-2105-4549-97ba-9f852d23287a.
IO controller
io_control01.c:108: TPASS: Found 7:0 in io.stat
io_control01.c:109: TPASS: Expect: (rbytes=177152) > (st_rbytes=88064)
io_control01.c:112: TPASS: Expect: (wbytes=2117632) > (st_wbytes=2110464)
io_control01.c:115: TPASS: Expect: (rios=81) > (st_rios=40)
io_control01.c:118: TPASS: Expect: (wios=3094) > (st_wios=3085)
tst_test.c:1956: TINFO: === Testing on ext4 ===
tst_test.c:1280: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
mke2fs 1.47.1 (20-May-2024)
tst_test.c:1292: TINFO: Mounting /dev/loop0 to /tmp/LTP_io_OJSpPM/mnt fstyp=ext4 flags=0
EXT4-fs (loop0): mounted filesystem 713dce27-9c1e-4551-ac16-c9f2227ef775 r/w with ordered data mode. Quota mode: none.
io_control01.c:66: TINFO: Found 7:0 in io.stat
io_control01.c:92: TPASS: Did some IO in the IO contrEXT4-fs (loop0): unmounting filesystem 713dce27-9c1e-4551-ac16-c9f2227ef775.
oller
io_control01.c:108: TPASS: Found 7:0 in io.stat
io_control01.c:109: TPASS: Expect: (rbytes=234496) > (st_rbytes=177152)
io_control01.c:112: TPASS: Expect: (wbytes=2122752) > (st_wbytes=2117632)
io_control01.c:115: TPASS: Expect: (rios=92) > (st_rios=81)
io_control01.c:118: TPASS: Expect: (wios=3100) > (st_wios=3094)
tst_test.c:1956: TINFO: === Testing on vfat ===
tst_test.c:1280: TINFO: Formatting /dev/loop0 with vfat opts='' extra opts=''
tst_test.c:1292: TINFO: Mounting /dev/loop0 to /tmp/LTP_io_OJSpPM/mnt fstyp=vfat flags=0
io_control01.c:66: TINFO: Found 7:0 in io.stat
io_control01.c:92: TPASS: Did some IO in the IO controller
io_control01.c:108: TPASS: Found 7:0 in io.stat
io_control01.c:109: TPASS: Expect: (rbytes=283648) > (st_rbytes=234496)
io_control01.c:112: TPASS: Expect: (wbytes=7367680) > (st_wbytes=2122752)
io_control01.c:115: TPASS: Expect: (rios=94) > (st_rios=92)
io_control01.c:118: TPASS: Expect: (wios=7200) > (st_wios=3100)
Summary:
passed 24
failed 0
broken 0
skipped 0
warnings 0
Could someone kindly clarify whether we should increase the write buffer size in such cases, or if there might be something else I have overlooked?