kernel - Fix races in disk iteration and diskctx handling * Add disk->d_refs to prevent a disk structure from being destroyed out from under an iteration. * Redo the disk_enumeration() API to use markers and d_refs. * Make adjustments to the dsched API. In particular, do not return unreferenced tdio pointers in situations where they aren't used by the caller. * Properly implement the ref count on the tdio's, one for each of the two lists the tdio belongs to, and ensure that dsched_thread_io_alloc() keeps an extra ref on the tdio after releasing the diskctx lock to prevent it from being ripped out while the code is pondering whether to place the tdio on the tdctx list. * When deleting the tdio's for a tdctx try to destroy the diskctx. That is, simply dereferencing it from the thread is not sufficient. * When deleting the tdio's for a diskctx try to destroy the tdctx. That is, simply dereferencing it from the diskctx is not sufficient. * Handle destroy/ref races.
↧
kernel - Fix races in disk iteration and diskctx handling
↧