Print which multipath device this provider/path is used by.
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Not that I have specific objections against this, but I think it would be much better to implement a generic way to print all consumers connected to specified GEOM provider. This code does not look anyhow specific to gmultipath.
Maybe something like "geom -c <consumer-name>" to complement the existing "geom -p <provider-name>"?
Consumers don't have personal names in GEOM, only names of connected provider. Plus there can be many consumers connected to the same provider. But I like the direction of thought. Or it should not be difficult to add another sub-command.
Adding a consumer/brief flag to "geom -p <provider>" so it just prints consumers would be really nice actually. I could look into adding that as well.
So I experimented a little and remade this as "geom -c <consumer>". But unless I figure out a good way to filter by class it is useless. Right now it will just pick whatever class the provider first appears in, like DEV. So the proper way, IMO, to do that would be "geom <class> which <consumer>" and not just add another flag. But then "which" would only exist when using "geom" directly and not when using "gmultipath"/"gpart"/"glabel" binaries which I think would look weird. What are your thoughts?