Skip to content

[RHELMISC-32989] add deviceless message support for capacity queries#100

Open
bjohnsto wants to merge 2 commits into
dm-vdo:mainfrom
bjohnsto:add-deviceless-message-impl
Open

[RHELMISC-32989] add deviceless message support for capacity queries#100
bjohnsto wants to merge 2 commits into
dm-vdo:mainfrom
bjohnsto:add-deviceless-message-impl

Conversation

@bjohnsto
Copy link
Copy Markdown
Member

Add a deviceless message handler to the VDO target that allows querying VDO capacity information without an active device instance. The "capacity" message accepts logical blocks, physical blocks, slab size, index memory, and index sparse parameters, simulates VDO initialization, and returns a structured response with logical blocks, data blocks, max data blocks, slab count, and max slab count.

Also adds vdo_compute_logical_blocks() to correctly compute the default logical size by subtracting block map forest overhead from available data blocks.

Bumps VDO target version to 9.3.0.

bjohnsto added 2 commits May 29, 2026 17:09
Add support for target messages that don't require an active device
instance. This allows querying target-specific information without
creating a device.

Adds dm_deviceless_message_fn typedef and deviceless_message field to
struct target_type in device-mapper.h.

Modifies dm-ioctl.c to route messages with device name "." to the
target's deviceless_message handler. The message format is:

  dmsetup message . 0 <target-name> <message> [args...]

The target name is extracted from argv[0] and the remaining arguments
are passed to the target's deviceless_message function.

Signed-off-by: Bruce Johnston <bjohnsto@redhat.com>
Add a deviceless message handler to the VDO target that allows
querying VDO capacity information without an active device instance.
The "capacity" message accepts logical blocks, physical blocks, slab
size, index memory, and index sparse parameters, simulates VDO
initialization, and returns a structured response with logical blocks,
data blocks, max data blocks, slab count, and max slab count.

Also adds vdo_compute_logical_blocks() to correctly compute the default
logical size by subtracting block map forest overhead from available
data blocks.

Bumps VDO target version to 9.3.0.

Signed-off-by: Bruce Johnston <bjohnsto@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant