public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ublk: introduce UBLK_CMD_TRY_STOP_DEV
@ 2026-01-04  8:48 Yoav Cohen
  2026-01-04  8:48 ` [PATCH v2 1/2] ublk: make ublk_ctrl_stop_dev return void Yoav Cohen
  2026-01-04  8:48 ` [PATCH v2 2/2] ublk: add UBLK_CMD_TRY_STOP_DEV command Yoav Cohen
  0 siblings, 2 replies; 5+ messages in thread
From: Yoav Cohen @ 2026-01-04  8:48 UTC (permalink / raw)
  To: linux-block, csander, ming.lei; +Cc: jholzman, omril, Yoav Cohen

Hello,

This patch series introduces a new command for ublk device management.

The first patch changes `ublk_ctrl_stop_dev()` to return void, since it
always returned 0. This simplifies the API.

The second patch introduces `UBLK_CMD_TRY_STOP_DEV`, which stops the
device only if there are no active openers. Unlike the existing stop
command (`UBLK_CMD_STOP_DEV`), this command avoids disrupting active
users by returning -EBUSY if the device is busy.

These patches only introduce the new command and API simplification
without altering existing behavior for active users.

Yoav Cohen (2):
  ublk: make ublk_ctrl_stop_dev return void
  ublk: add UBLK_CMD_TRY_STOP_DEV command

 drivers/block/ublk_drv.c      | 48 ++++++++++++++++++++++++++++++++---
 include/uapi/linux/ublk_cmd.h |  3 ++-
 2 files changed, 47 insertions(+), 4 deletions(-)

-- 
2.39.5 (Apple Git-154)


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

end of thread, other threads:[~2026-01-06 14:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-04  8:48 [PATCH v2 0/2] ublk: introduce UBLK_CMD_TRY_STOP_DEV Yoav Cohen
2026-01-04  8:48 ` [PATCH v2 1/2] ublk: make ublk_ctrl_stop_dev return void Yoav Cohen
2026-01-06 14:14   ` Ming Lei
2026-01-04  8:48 ` [PATCH v2 2/2] ublk: add UBLK_CMD_TRY_STOP_DEV command Yoav Cohen
2026-01-06 14:28   ` Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox