linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ublk: Graceful Upgrade of ublk server application
@ 2025-04-15  8:15 Yoav Cohen
  2025-04-15 11:06 ` Ming Lei
  0 siblings, 1 reply; 9+ messages in thread
From: Yoav Cohen @ 2025-04-15  8:15 UTC (permalink / raw)
  To: linux-block@vger.kernel.org; +Cc: ming.lei@redhat.com, axboe@kernel.dk

I am seeking advice on whether it is possible to upgrade the ublksrv version without terminating the daemon abruptly. Specifically, I would like the daemon to exit gracefully, ensuring all necessary cleanups are performed.
In my current implementation, I attempted to cancel all ublk uring SQEs (specifically the COMMIT_AND_FETCH_REQ/FETCH_REQ operations) using the following approach:
io_uring_prep_cancel_fd(sqe, cdev_fd, IORING_ASYNC_CANCEL_ALL);io_uring_prep_cancel_fd(sqe, cdev_fd, IORING_ASYNC_CANCEL_ALL);
However, this method does not seem to be effective. In my scenario, I have a single io_uring instance that serves multiple devices and other producers, so simply stopping the polling of CQEs is not a viable solution due to potential race conditions.
Could you please provide any suggestions or guidance on how to achieve a graceful upgrade of the ublksrv version without causing disruptions?
 
Thank you

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-04-21  2:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15  8:15 ublk: Graceful Upgrade of ublk server application Yoav Cohen
2025-04-15 11:06 ` Ming Lei
2025-04-15 19:46   ` Yoav Cohen
2025-04-16  0:51     ` Uday Shankar
2025-04-16  1:39       ` Ming Lei
2025-04-16  8:16         ` Yoav Cohen
2025-04-16  9:12           ` Ming Lei
2025-04-20  8:57             ` Yoav Cohen
2025-04-21  2:43               ` Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).