device busy attribute to prevent attaching devices whose children are in use#144
device busy attribute to prevent attaching devices whose children are in use#144piotrbartman wants to merge 2 commits into
Conversation
…tries previous udev script just deleted the parent entry when a partition was busy we keep this behavior for local use the "busy marker" is propagated to USB parent
if one of subdevices are locally used (e.g. in sys-usb) the parent is considered busy.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #144 +/- ##
=======================================
Coverage 71.24% 71.24%
=======================================
Files 6 6
Lines 991 991
=======================================
Hits 706 706
Misses 285 285 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026071723-devel&flavor=pull-requests Test run included the following:
Upload failures
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026050504-devel&flavor=update
Failed tests22 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/176874#dependencies 25 fixed
Unstable testsDetails
Performance TestsPerformance degradation:19 performance degradations
Remaining performance tests:91 tests
|
add
busyattribute handling so a device that's in use (attached or used locally) stays visible in QubesDB with a busy=True marker instead of disappearing entirely, and propagates that marker up to the parent disk and the USB ancestor.xs_mark_busy,xs_mark_usb_busyset busy on the device and on the USB parent.usb_parent_still_in_usescans all sibling devices for either attachment or local use, to decide if the USB busy marker can be cleared.qubes.RefreshBlockDevicesre-triggers udev change events for it and its partitions after detach to force a state refresh from the one place that actually knows the truth (backend's sysfs + mount table), instead of guessing from cache.Open items: