I/O error on kernel 4.19.XX

System is X86-64 with J3060 CPU, MiniPCI-e SSD drive 16 GB.
On current branch master with kernel 4.19.XX i get this errors randomly in kernel log:

[   20.490634] print_req_error: I/O error, dev loop0, sector 77824
[   20.496985] print_req_error: I/O error, dev loop0, sector 90112
[   20.503168] F2FS-fs (loop0): Issue discard(9728, 9728, 1) failed, ret: -5
[   20.510302] F2FS-fs (loop0): Issue discard(11264, 11264, 1) failed, ret: -5
...
[   76.698152] print_req_error: I/O error, dev loop0, sector 82064
[   76.704344] print_req_error: I/O error, dev loop0, sector 81920
[   76.710473] print_req_error: I/O error, dev loop0, sector 77832
[   76.716590] print_req_error: I/O error, dev loop0, sector 77856
[   76.722709] print_req_error: I/O error, dev loop0, sector 77872
[   76.728859] print_req_error: I/O error, dev loop0, sector 77920
[   76.735033] print_req_error: I/O error, dev loop0, sector 82216
[   76.741134] print_req_error: I/O error, dev loop0, sector 82264
[   76.747297] print_req_error: I/O error, dev loop0, sector 90120
[   76.753481] F2FS-fs (loop0): Issue discard(10258, 10258, 18) failed, ret: -5
[   76.760835] F2FS-fs (loop0): Issue discard(10240, 10240, 17) failed, ret: -5
[   76.768141] F2FS-fs (loop0): Issue discard(9729, 9729, 2) failed, ret: -5
[   76.775161] F2FS-fs (loop0): Issue discard(9732, 9732, 1) failed, ret: -5
[   76.782180] F2FS-fs (loop0): Issue discard(9734, 9734, 2) failed, ret: -5
[   76.789222] F2FS-fs (loop0): Issue discard(9740, 9740, 1) failed, ret: -5
[   76.796213] F2FS-fs (loop0): Issue discard(10277, 10277, 1) failed, ret: -5
[   76.803403] F2FS-fs (loop0): Issue discard(10283, 10283, 1) failed, ret: -5
[   76.810609] F2FS-fs (loop0): Issue discard(11265, 11265, 1) failed, ret: -5

I have change kernel to 4.14.XXX and rebuild image, then flash it on same system with "keep settings" option, and there is no problems at all for a days...

I have search in google and found post with same problem:


Translate a last post:
4.19 kernel compatibility issue with f2fs, resolved

Is it will resolve on OpenWrt too?

f2fs is more or less broken with loop device... See:
https://github.com/openwrt/openwrt/pull/1813 (discussion)
https://github.com/openwrt/openwrt/pull/1847

With new master branch (w/kernel 4.19) this problem has become more actual for me and i have made some investigation. I have found a source of problem - ath10k drivers (QCA9884).
If ath10k wlan is disabled - there is no errors in log at all, if after some time after boot i will enable ath10k radio, there is no problems to.
But, when radio enabled and system boot - there is randomly errors in log.
So, it needs that radio was disabled before full boot (maybe some conflicts in boot order initializatoons).
How to fix this?

Likely still a problem with your file system -- the ath10k drivers need to load firmware from disk into the chip, and that may just be a trigger of the underlying file-system problem.

Don't use F2FS on loop.

You've got an SSD, you should be able to treat it as a disk, not as flash (unless it's so cheap it's got a crap controller).

I don't understand how to "don't use F2FS on loop" and i can't understand why it works w/o any errors when enable radio later after boot process ends?

If it was intuitively obvious why it fails, it would have been fixed (or abandoned) a long time age.

There is some suggestion in the links provided that loop, in general, has problems.

Ok, so, can you please help me with how to "don't use F2FS on loop"?

How did you configure it to use F2FS?

Default images for x86_64 use ext4, at least last time I installed one.

If you lower the root file system size below ~90Mbyte it'll use ext4 instead but you still need to apply https://github.com/openwrt/openwrt/pull/1847 or at least l need to do that on my devices.

1 Like

I did't configure anything, have just write img (openwrt-x86-64-combined-squashfs.img.gz) on SSD and get:
%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5


f2fs is more or less broken right now unless the kernel just spits out errors for fun...

It's not forgotten. But the fixes like these https://patchwork.kernel.org/cover/10931787/ have to bubble up from upstream.

1 Like

It seems that all is fixed now, errors is gone on fresh master branch.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.