-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
devmapper: show device and loop file , if used #10003
Conversation
Presenly the "Data file:" shows either the loopback _file_ or the block device. With this, the "Data file:" will always show the device, and if it is a loopback, then there will additionally be a "Data loop file:". (Same for "Metadata file:") Signed-off-by: Vincent Batts <vbatts@redhat.com>
LGTM |
It would be nice if the and yes, I'm thankful for what's there already :) |
} else { | ||
status.MetadataLoopback = path.Join(devices.loopbackDir(), "metadata") | ||
} | ||
status.DataFile = devices.DataDevicePath() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why you created methods for devices.dataDevice
and not for devices.dataLoopFile
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah. good catch. I was initially having an "intelligent" function to return the information, but decided both device and file name is important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, i remember now. If an inspectors of the DeviceSet instance wanted to access that information, having it in a function protects the private variable.
@SvenDowideit I will cook you up some |
LGTM |
devmapper: show device and loop file , if used
Presenly the "Data file:" shows either the loopback file or the block device.
With this, the "Data file:" will always show the device, and if it is a
loopback, then there will additionally be a "Data loop file:".
(Same for "Metadata file:")
@unclejack
Signed-off-by: Vincent Batts vbatts@redhat.com