From: Yoav Cohen <yoav@nvidia.com>
To: <ming.lei@redhat.com>, <linux-block@vger.kernel.org>
Cc: <jholzman@nvidia.com>, <omril@nvidia.com>, <ofer@nvidia.com>,
Yoav Cohen <yoav@nvidia.com>
Subject: [PATCH 0/2] ublk: introduce UBLK_CMD_TRY_STOP_DEV
Date: Tue, 30 Dec 2025 14:51:38 +0200 [thread overview]
Message-ID: <20251230125140.43760-1-yoav@nvidia.com> (raw)
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 | 45 ++++++++++++++++++++++++++++++++---
include/uapi/linux/ublk_cmd.h | 3 ++-
2 files changed, 44 insertions(+), 4 deletions(-)
--
2.39.5 (Apple Git-154)
next reply other threads:[~2025-12-30 12:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 12:51 Yoav Cohen [this message]
2025-12-30 12:51 ` [PATCH 1/2] ublk: make ublk_ctrl_stop_dev return void Yoav Cohen
2025-12-30 12:51 ` [PATCH 2/2] ublk: add UBLK_CMD_TRY_STOP_DEV command Yoav Cohen
2025-12-30 13:20 ` Yoav Cohen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251230125140.43760-1-yoav@nvidia.com \
--to=yoav@nvidia.com \
--cc=jholzman@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=ofer@nvidia.com \
--cc=omril@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).