public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ublk: rework partition handling
@ 2026-02-27 14:57 Alexander Atanasov
  2026-02-27 14:57 ` [PATCH v2 1/4] ublk: cleanup partition flags handling and introduce UBLK_F_NO_PARTITONS Alexander Atanasov
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Alexander Atanasov @ 2026-02-27 14:57 UTC (permalink / raw)
  To: Ming Lei, Jens Axboe; +Cc: linux-block, Alexander Atanasov

Rework how partitions are handled for ublk devices.

Disable partitions on unprivileged devices completely -
GD_SUPPRESS_PART_SCAN is used but partitions still can
be created by userspace scan.
Use GENHD_FL_NO_PART to fully disable partitions on device.

For privileged device partitions are enabled by default -
they can be disabled by new UBLK_F_NO_PARTITIONS flag.
Auto partition scan can be disabled by UBLK_F_NO_AUTO_PART_SCAN.

Update related tests and documentation.

-v1->v2:
  - remove code duplication and extra flag settings
  - switch from out-in to out-out to preserve backwards compatibility

Alexander Atanasov (4):
  ublk: cleanup partition flags handling and introduce UBLK_F_NO_PARTITONS
  selftests: ublk: rework partitions tests for new flags
  ublk: document partition flags, kublk and update external links
  selftests: ublk: cleanup kublk.h

 Documentation/block/ublk.rst                  | 22 +++++++++++++---
 drivers/block/ublk_drv.c                      | 25 +++++++++----------
 include/uapi/linux/ublk_cmd.h                 |  7 ++++--
 tools/testing/selftests/ublk/kublk.c          | 18 ++++++++-----
 tools/testing/selftests/ublk/kublk.h          |  1 -
 .../selftests/ublk/test_integrity_01.sh       |  9 ++++---
 tools/testing/selftests/ublk/test_part_01.sh  | 14 +++++------
 tools/testing/selftests/ublk/test_part_02.sh  |  6 +++--
 8 files changed, 64 insertions(+), 38 deletions(-)


base-commit: 72f4d6fca699a1e35b39c5e5dacac2926d254135
-- 
2.43.0


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

end of thread, other threads:[~2026-02-28 10:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27 14:57 [PATCH v2 0/4] ublk: rework partition handling Alexander Atanasov
2026-02-27 14:57 ` [PATCH v2 1/4] ublk: cleanup partition flags handling and introduce UBLK_F_NO_PARTITONS Alexander Atanasov
2026-02-27 18:29   ` Caleb Sander Mateos
2026-02-28  2:06     ` Ming Lei
2026-02-28  5:30       ` Alexander Atanasov
2026-02-28  7:19         ` Ming Lei
2026-02-27 14:57 ` [PATCH v2 2/4] selftests: ublk: rework partitions tests for new flags Alexander Atanasov
2026-02-28 10:06   ` Ming Lei
2026-02-27 14:57 ` [PATCH v2 3/4] ublk: document partition flags, kublk and update external links Alexander Atanasov
2026-02-28 10:07   ` Ming Lei
2026-02-27 14:57 ` [PATCH v2 4/4] selftests: ublk: cleanup kublk.h Alexander Atanasov
2026-02-28 10:07   ` Ming Lei

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