ublk: check for unprivileged daemon on each I/O fetch
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 8 Aug 2025 15:52:15 +0000 (09:52 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 11 Aug 2025 13:57:48 +0000 (07:57 -0600)
commit5058a62875e1916e5133a1639f0207ea2148c0bc
tree741b7a5f59fdcc414b7691342a62d03055f9b420
parent212c928d01e9ea1d1c46a114650b551da8ca823e
ublk: check for unprivileged daemon on each I/O fetch

Commit ab03a61c6614 ("ublk: have a per-io daemon instead of a per-queue
daemon") allowed each ublk I/O to have an independent daemon task.
However, nr_privileged_daemon is only computed based on whether the last
I/O fetched in each ublk queue has an unprivileged daemon task.
Fix this by checking whether every fetched I/O's daemon is privileged.
Change nr_privileged_daemon from a count of queues to a boolean
indicating whether any I/Os have an unprivileged daemon.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Fixes: ab03a61c6614 ("ublk: have a per-io daemon instead of a per-queue daemon")
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250808155216.296170-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c