History

ublk: add UBLK_F_NO_AUTO_PART_SCAN feature flag

Add a new feature flag UBLK_F_NO_AUTO_PART_SCAN to allow users to suppress automatic partition scanning when starting a ublk device. This is useful for some cases in which user don't want to scan partitions. Users still can manually trigger partition scanning later when appropriate using standard tools (e.g., partprobe, blockdev --rereadpt).

Ming Lei committed 9 months ago

Commit 8443e201 parent 66d3af82 files · +13 −4Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/ublk_cmd.h+3−0
@@ -367,6 +367,9 @@ · 366 unmodified lines
367367 */
368368 #define UBLK_F_SAFE_STOP_DEV (1ULL << 17)
369369
370+/* Disable automatic partition scanning when device is started */
371+#define UBLK_F_NO_AUTO_PART_SCAN (1ULL << 18)
372+
370373 /* device state */
371374 #define UBLK_S_DEV_DEAD 0
372375 #define UBLK_S_DEV_LIVE 1