multipath: call store_pathinfo with DI_BLACKLIST
Benjamin Marzinski
maintainerPATCH 1/1 multipath: call store_pathinfo with DI_BLACKLIST
Commit ca19f865f moved adding DI_BLACKLIST to the pathinfo flags out of store_pathinfo(), but it didn't add it to all of the necessary callers. Without this, store_pathinfo() callers can do unnecessary extra work, including running the path checker on blacklisted devices. Also, running
multipathd add path <blacklisted_path_device>
will add a blacklisted path.
--- libmultipath/discovery.c | 3 ++- multipathd/cli_handlers.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
libmultipath/discovery.c +2 -1
@@ -134,7 +134,8 @@ path_discover (vector pathvec, struct config * conf, pp =find_path_by_devt (pathvec, devt);if (!pp)return store_pathinfo (pathvec, conf, - udevice, flag,NULL ); + udevice, flag |DI_BLACKLIST , +NULL ); }return pathinfo (pp, conf, flag); }
multipathd/cli_handlers.c +1 -1
@@ -730,7 +730,7 @@ cli_add_path (void * v, char ** reply, int * len, void * data) conf =get_multipath_config ();pthread_cleanup_push (put_multipath_config, conf); r =store_pathinfo (vecs->pathvec, conf, - udevice,DI_ALL , &pp); + udevice,DI_ALL |DI_BLACKLIST , &pp);pthread_cleanup_pop (1 );udev_device_unref (udevice);if (!pp) {
Signature · 1 line
2.17.2
Quoted 12 lines · Benjamin Marzinski
Commit
ca19f865fmoved addingDI_BLACKLISTto the pathinfo flags out ofstore_pathinfo(), but it didn't add it to all of the necessary callers.
Without this,store_pathinfo()callers can do unnecessary extra work, including running the path checker on blacklisted devices. Also, runningmultipathd add path <
blacklisted_path_device>will add a blacklisted path.
Quoted 8 lines
Fixes ca19f865f "libmultipath: add 'cmd' as argument for
get_refwwid()"Cc Hannes Reinecke <[email protected]>Signed-off-by Benjamin Marzinski <[email protected]>--- libmultipath/discovery.c | 3 ++- multipathd/cli_handlers.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)