-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev_id and/or device file path are not exposed after starting device #82
Comments
Whoops, the dev_id and all other device info fields can be obtained with the already existing function extern const struct ublksrv_ctrl_dev_info *ublksrv_ctrl_get_dev_info(const struct ublksrv_ctrl_dev *dev); However, the Maybe I missed how to obtain that too. |
Yeah, it may be provided by one autoconf macro or passed from command line, what do you think of this way? Thanks, |
I think that would work. Another idea which I don't have fully thought through is it would be nice if the user could supply the block device, including the full path too. But looking at how the ublk driver creates block devices I'm not sure if that's possible or easy to do: https://github.com/torvalds/linux/blob/master/drivers/block/ublk_drv.c#L2316 |
I realized I could always use mkod so there's no need for ublk to take the block device file name as input.
I think this is best |
include/ublksrv_priv.h
containsublksrv_ctrl_dev->ublksrv_ctrl_dev_info->dev_id
but the dev_id isn't accessible otherwise.It would be nice if there was some utility functions in
include/ublksrv_utils.h
which returns the dev_id and/or the file path names of either the control device or the block device.The text was updated successfully, but these errors were encountered: