Closed ssiloti closed 4 months ago
Right, the time left after returnin from select is 59.999999... and the file descriptor is set in the exceptions set. Using execptfds for sysfs is recommended but the file descriptor needs to be closed and opened again before another select.
There were two problems, fd must be reopened and the data read before doing select. Now fixed in devel, thanks for the report.
When a
btrfs balance start --enqueue
command is issued while another balance is in progress the enqueued process uses 100% of a CPU while waiting for the first balance to finish. I took a look with strace and found:It looks like a select which is supposed to block pending a timeout/event is always returning immediately.
This is on Linux 6.6.17 with btrfs-progs 6.7