consistent behavior of filter_property()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | pathinfo: call filter_property() after sysfs_pathinfo()libmultipath/ libmultipath/ tests/ +2 more | +105 | 0 replies | |
| 2/3 | libmultipath: pathinfo: call filter_property only with DI_BLACKLISTlibmultipath/ tests/ | +15 | 0 replies | |
| 3/3 | multipath -w: allow removing blacklisted pathslibmultipath/ | +2 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Benjamin Marzinski |
|---|---|
| Series | R-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [dm-devel] [PATCH 0/3] consistent behavior of filter_property()
From: Martin Wilck <[email protected]>
This is a spring-off of the previous discussion under the subject "libmultipath: fix NULL dereference in get_be64".
Repeating part of the text of my last post there:
pp->uid_attribute may be set from the hwtable, which
means that vendor/product must be known, which in turn means that uid_attribute can't be set correctly before sysfs_pathinfo() is run. Thus, in order to be consistent, we need to move the filter_property() further down in pathinfo(), after the call to sysfs_pathinfo().
However, that has a side effect. As Ben already stated, pp->uid_attribute currently is *never* set the first time the call chain pathinfo()->filter_property() is run. After the proposed change, it would *always* be set in this call chain, possibly leading to more cases where pathinfo returns PATHINFO_SKIPPED.
This matters e.g. for "multipath -w". When we remove a WWID, we must be sure get_refwwid() fills in the wwid, which won't happen if PATHINFO_SKIPPED is returned.
(While looking at this, I discovered that it didn't work in current upstream either. I guess it has been broken since 0.6.0, or 355291b ("libmultipath: filter for missing property in get_refwwid()" This lead to the addition of patch 3/3).
In order not to break such use cases, we need to make the filter_property() test in pathinfo() dependent on DI_BLACKLIST. That would make a lot of sense, but it'd cause a semantic change.
Comments welcome.
Regards
Martin
Martin Wilck (3):
pathinfo: call filter_property() after sysfs_pathinfo()
libmultipath: pathinfo: call filter_property only with DI_BLACKLIST multipath -w: allow removing blacklisted paths
libmultipath/configure.c | 4 +- libmultipath/discovery.c | 19 +++++++-- libmultipath/valid.c | 4 -- tests/Makefile | 2 +- tests/test-lib.c | 18 ++++---- tests/valid.c | 91 ++++++++++++++++++++++++++++++++++++---- 6 files changed, 111 insertions(+), 27 deletions(-)
Signature · 7 lines
2.29.2 -- dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel