linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] ublk_drv: add generic mechanism to get/set parameters
@ 2022-07-23 15:07 Ming Lei
  2022-07-23 15:07 ` [PATCH 1/2] ublk_drv: store device parameters Ming Lei
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Ming Lei @ 2022-07-23 15:07 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-block, ZiyangZhang, Christoph Hellwig, Ming Lei

Hello,

The 1st patch implements generic mechanism to store & validate & apply
parameters.

The 2nd patch adds SET_PARA/GET_PARA control commands to support to
get/set parameters from userspace.

At least block device parameters and feature parameters can be supported
to get/set with this approach, so it could be easier to implement all
kinds of generic userspace block device with all sort of setting,
meantime can be extended easily in future.

Verified by two examples(demo_null.c & demo_event.c) in the following branch:

https://github.com/ming1/ubdsrv/tree/set_get_para

BTW, I plan to switch to exchange data between control and io task by json
first, then use SET/GET PARA command in ublksrv_tgt.c.

Ming Lei (2):
  ublk_drv: store device parameters
  ublk_drv: add SET_PARA/GET_PARA control command

 drivers/block/ublk_drv.c      | 349 ++++++++++++++++++++++++++++++++--
 include/uapi/linux/ublk_cmd.h |  45 +++++
 2 files changed, 382 insertions(+), 12 deletions(-)

-- 
2.31.1


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

end of thread, other threads:[~2022-07-27  0:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-23 15:07 [PATCH 0/2] ublk_drv: add generic mechanism to get/set parameters Ming Lei
2022-07-23 15:07 ` [PATCH 1/2] ublk_drv: store device parameters Ming Lei
2022-07-25  6:42   ` Christoph Hellwig
2022-07-25  7:06     ` Ming Lei
2022-07-26 12:32       ` Christoph Hellwig
2022-07-26 14:21         ` Ming Lei
2022-07-26 17:47           ` Christoph Hellwig
2022-07-27  0:12             ` Ming Lei
2022-07-23 15:07 ` [PATCH 2/2] ublk_drv: add SET_PARA/GET_PARA control command Ming Lei
2022-07-25  6:45   ` Christoph Hellwig
2022-07-25  7:07     ` Ming Lei
2022-07-25  6:47 ` [PATCH 0/2] ublk_drv: add generic mechanism to get/set parameters Christoph Hellwig
2022-07-25  7:10   ` 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).