The issue has been observed on PopOS and Fedora 35-37 with the kernels starting from 5.17. And it's not reproducible on Ubuntu 22.04 with kernel 5.15.
It's reproducible by our tests in case if the tracked device being dismounted.
It can be reproduced in our tests by sudo ./elio-test.sh -t test_destroy or sudo ./elio-test.sh -t test_reload.
@skiptomy has a strong opinion that it's not a bug because some device has been dismounted before the request queue became empty and our driver is unloaded right after that in tests. And, the main statement, all remaining BIOs are submitted right after the dormant incremental becomes active when device has been mounted back.
I'm not so sure in safety of this behavior. At least we can try implement some logic to wait while queued BIOs are submitted before dismount. Driver controls mount/dismount hooks. And maybe it'll be a proper place to wait there before dismount.
Logs from Fedora 37 with kernel 6.0.14-300.fc37.x86_64
dmesg after sudo ./elio-test.sh -t test_reload: f37_reload.log
dmesg after sudo ./elio-test.sh -t test_destroy: f37_destroy.log
The issue has been observed on PopOS and Fedora 35-37 with the kernels starting from 5.17. And it's not reproducible on Ubuntu 22.04 with kernel 5.15. It's reproducible by our tests in case if the tracked device being dismounted. It can be reproduced in our tests by
sudo ./elio-test.sh -t test_destroy
orsudo ./elio-test.sh -t test_reload
.Dmesg output looks like this:
@skiptomy has a strong opinion that it's not a bug because some device has been dismounted before the request queue became empty and our driver is unloaded right after that in tests. And, the main statement, all remaining BIOs are submitted right after the dormant incremental becomes active when device has been mounted back.
I'm not so sure in safety of this behavior. At least we can try implement some logic to wait while queued BIOs are submitted before dismount. Driver controls mount/dismount hooks. And maybe it'll be a proper place to wait there before dismount.
Logs from Fedora 37 with kernel
6.0.14-300.fc37.x86_64
dmesg aftersudo ./elio-test.sh -t test_reload
: f37_reload.log dmesg aftersudo ./elio-test.sh -t test_destroy
: f37_destroy.log