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
367 */367 */
368#define UBLK_F_SAFE_STOP_DEV (1ULL << 17)368#define UBLK_F_SAFE_STOP_DEV (1ULL << 17)
369 369
370/* Disable automatic partition scanning when device is started */
371#define UBLK_F_NO_AUTO_PART_SCAN (1ULL << 18)
372
370/* device state */373/* device state */
371#define UBLK_S_DEV_DEAD 0374#define UBLK_S_DEV_DEAD 0
372#define UBLK_S_DEV_LIVE 1375#define UBLK_S_DEV_LIVE 1