[dm-devel] [PATCH] multipath-tools: enable exec bit for kpartx/kpartx_id script
Cc: Christophe VaroquiCc: device-mapper development Signed-off-by: Xose Vazquez Perez --- kpartx/kpartx_id | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 kpartx/kpartx_id diff --git a/kpartx/kpartx_id b/kpartx/kpartx_id old mode 100644 new mode 100755 -- 2.10.2 -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] libmultipath: fix missing dm_task_destroy() in dm_reassign()
Merged. Thanks. On Mon, Nov 7, 2016 at 3:01 AM,wrote: > From: "zhou.guichun" > > dm_task should be destoryed before going out of dm_reassign() > > Signed-off-by: zhou.guichun > --- > libmultipath/devmapper.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c > index 5aea5b6..e9d13b6 100644 > --- a/libmultipath/devmapper.c > +++ b/libmultipath/devmapper.c > @@ -1582,10 +1582,9 @@ int dm_reassign(const char *mapname) > sysfs_check_holders(dm_dep, dev_t); > } > > - dm_task_destroy (dmt); > - > r = 1; > out: > + dm_task_destroy (dmt); > return r; > } > > -- > 2.8.1.windows.1 > > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] Makefiles: Fix function availability checks
Very nice, thanks. Merged. On Fri, Nov 18, 2016 at 8:52 PM, Bart Van Asschewrote: > The current implementation of the code that checks for function > presence is not correct because it checks for a prefix match only. > Introduce a function that checks for the exact function name. > Additionally, report whether or not the function has been found. > An example of the output produced by this function if 'make' is > run: > > Checking for dm_task_no_flush in /usr/include/libdevmapper.h ... yes > Checking for dm_task_set_cookie in /usr/include/libdevmapper.h ... yes > Checking for udev_monitor_set_receive_buffer_size in > /usr/include/libudev.h ... yes > Checking for dm_task_deferred_remove in /usr/include/libdevmapper.h ... yes > > Signed-off-by: Bart Van Assche > --- > Makefile.inc | 14 ++ > kpartx/Makefile | 4 +--- > libmultipath/Makefile | 16 > 3 files changed, 19 insertions(+), 15 deletions(-) > > diff --git a/Makefile.inc b/Makefile.inc > index 1cc8f44..e7f4e05 100644 > --- a/Makefile.inc > +++ b/Makefile.inc > @@ -69,5 +69,19 @@ OPTFLAGS = -O2 -g -pipe -Wall -Wextra -Wformat=2 \ > CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\" > -DRUN_DIR=\"${RUN}\" > SHARED_FLAGS = -shared > > +# Check whether a function with name $1 has been declared in header file > $2. > +check_func = > \ > +$(shell > \ > + if grep -Eq "^[^[:blank:]]+[[:blank:]]+$1[[:blank:]]*(.*)*" "$2"; > then \ > + found=1; > \ > + status="yes"; > \ > + else > \ > + found=0; > \ > + status="no"; > \ > + fi; > \ > + echo 1>&2 "Checking for $1 in $2 ... $$status"; > \ > + echo "$$found" > \ > +) > + > %.o: %.c > $(CC) $(CFLAGS) -c -o $@ $< > diff --git a/kpartx/Makefile b/kpartx/Makefile > index e8a59f2..9441a2b 100644 > --- a/kpartx/Makefile > +++ b/kpartx/Makefile > @@ -7,9 +7,7 @@ CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 > > LIBDEPS += -ldevmapper > > -LIBDM_API_COOKIE = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_set_cookie' > /usr/include/libdevmapper.h) > - > -ifneq ($(strip $(LIBDM_API_COOKIE)),0) > +ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h), > 0) > CFLAGS += -DLIBDM_API_COOKIE > endif > > diff --git a/libmultipath/Makefile b/libmultipath/Makefile > index 495cebe..a11e483 100644 > --- a/libmultipath/Makefile > +++ b/libmultipath/Makefile > @@ -20,27 +20,19 @@ ifdef SYSTEMD > endif > endif > > -LIBDM_API_FLUSH = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_no_flush' > /usr/include/libdevmapper.h) > - > -ifneq ($(strip $(LIBDM_API_FLUSH)),0) > +ifneq ($(call check_func,dm_task_no_flush,/usr/include/libdevmapper.h),0) > CFLAGS += -DLIBDM_API_FLUSH -D_GNU_SOURCE > endif > > -LIBDM_API_COOKIE = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_set_cookie' > /usr/include/libdevmapper.h) > - > -ifneq ($(strip $(LIBDM_API_COOKIE)),0) > +ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h), > 0) > CFLAGS += -DLIBDM_API_COOKIE > endif > > -LIBUDEV_API_RECVBUF = $(shell grep -Ecs '^[a-z]*[[:space:]]+udev_ > monitor_set_receive_buffer_size' /usr/include/libudev.h) > - > -ifneq ($(strip $(LIBUDEV_API_RECVBUF)),0) > +ifneq ($(call check_func,udev_monitor_set_receive_buffer_size,/usr/ > include/libudev.h),0) > CFLAGS += -DLIBUDEV_API_RECVBUF > endif > > -LIBDM_API_DEFERRED = $(shell grep -Ecs > '^[a-z]*[[:space:]]+dm_task_deferred_remove' > /usr/include/libdevmapper.h) > - > -ifneq ($(strip $(LIBDM_API_DEFERRED)),0) > +ifneq ($(call check_func,dm_task_deferred_remove,/usr/include/ > libdevmapper.h),0) > CFLAGS += -DLIBDM_API_DEFERRED > endif > > -- > 2.10.1 > > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] libmultipath: remove unnecessary condition in checker_repair
Merged, thanks. On Mon, Nov 7, 2016 at 9:57 AM,wrote: > From: PengLiang > > The checker's validity is an unnecessary checking. It will be checked in > checker_selected. > > Signed-off-by: PengLiang > --- > libmultipath/checkers.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c > index fd999b0..05e024f 100644 > --- a/libmultipath/checkers.c > +++ b/libmultipath/checkers.c > @@ -213,7 +213,7 @@ void checker_put (struct checker * dst) > > void checker_repair (struct checker * c) > { > - if (!c || !checker_selected(c)) > + if (!checker_selected(c)) > return; > > c->message[0] = '\0'; > -- > 2.8.1.windows.1 > > > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] multipath-tools: remove Pure modifications
Hi Xose, I think I'll be able to empty the patches backlog today. These patches are still candidates, I just had to interrupt my merge session this morning. Thanks for the digest anyway. On Sun, Nov 20, 2016 at 12:41 PM, Xose Vazquez Perezwrote: > On 11/20/2016 10:15 AM, Christophe Varoqui wrote: > > > Applied, > > thanks. > > No sure, if you skipped or are delaying these patches: > Subject: [PATCH] multipath-tools: remove old multipath/{01_udev,02_multipath} > scripts > Subject: [PATCH] multipath-tools: merge nvme in similar blacklist regex > Subject: [PATCH] multipath-tools: update bl info for nvme in > multipath.conf.5 > Subject: [PATCH] multipath-tools: document exclusive_pref_bit for sysfs > > Thank you. > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH 0/3] more multipath config options
Applied, thanks. On Fri, Nov 11, 2016 at 11:58 PM, Benjamin Marzinskiwrote: > Here are two new mutipath config options, and the documentation for > disable_changed_wwids. > > Benjamin Marzinski (3): > document "disable_changed_wwids" config parameter > allow multipath to retry removes of in-use devices > add "max_sectors_kb" config parameter > > libmultipath/config.c | 3 +++ > libmultipath/config.h | 4 > libmultipath/configure.c | 2 ++ > libmultipath/defaults.h| 1 + > libmultipath/devmapper.c | 38 -- > libmultipath/devmapper.h | 4 ++-- > libmultipath/dict.c| 17 + > libmultipath/discovery.c | 23 +++ > libmultipath/discovery.h | 1 + > libmultipath/propsel.c | 16 > libmultipath/propsel.h | 1 + > libmultipath/structs.h | 6 ++ > multipath/main.c | 17 - > multipath/multipath.8 | 7 +++ > multipath/multipath.conf.5 | 35 +++ > 15 files changed, 150 insertions(+), 25 deletions(-) > > -- > 1.8.3.1 > > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] multipath-tools: increase the print length of the multipath fields
Applied, thanks. On Thu, Nov 10, 2016 at 1:32 PM,wrote: > From: "tang.wenji" > > The maximum field length is set to 64, which may be truncated when > displayed. > E.g:the multipath's 'features' field sets as "6 queue_if_no_path > pg_init_retries 3 pg_init_delay_msecs 30 retain_attached_hw_handler", but > it shows as "6 queue_if_no_path pg_init_retries 3 pg_init_delay_msecs 30 > ret" . > > Signed-off-by: tang.wenji > --- > libmultipath/print.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libmultipath/print.h b/libmultipath/print.h > index 6839fc7..b8c3436 100644 > --- a/libmultipath/print.h > +++ b/libmultipath/print.h > @@ -66,7 +66,7 @@ > > #define MAX_LINE_LEN 80 > #define MAX_LINES 64 > -#define MAX_FIELD_LEN 64 > +#define MAX_FIELD_LEN 128 > #define PROGRESS_LEN 10 > > struct path_data { > -- > 2.8.1.windows.1 > > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] multipath-tools: remove Pure modifications
Applied, thanks. On Mon, Nov 7, 2016 at 3:40 PM, Xose Vazquez Perezwrote: > There is no reason to deviate from standard values. > > Default: > .fast_io_fail = 5 > .dev_loss = 600 > > Cc: Christophe Varoqui > Cc: device-mapper development > Signed-off-by: Xose Vazquez Perez > --- > libmultipath/hwtable.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c > index 340035e..6ca9ea2 100644 > --- a/libmultipath/hwtable.c > +++ b/libmultipath/hwtable.c > @@ -899,8 +899,6 @@ static struct hwentry default_hw[] = { > .vendor= "PURE", > .product = "FlashArray", > .pgpolicy = MULTIBUS, > - .fast_io_fail = 10, > - .dev_loss = 60, > }, > /* > * Huawei > -- > 2.10.2 > > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
Re: [dm-devel] [PATCH] mpathpersistent: segment faulty occured in mpath_persistent_reserve_in()
Applied, thanks. On Mon, Nov 7, 2016 at 7:35 AM,wrote: > From: "tang.wenji" > > Segment faulty occured when executing "mpathpersist -i -k > /dev/mapper/mpath1" command.The reason is that an uninitialized global > variable conf is used in mpath_persistent_reserve_in(). The same > problem also exists in mpath_persistent_reserve_out(). > > Signed-off-by: tang.wenji > --- > libmpathpersist/mpath_persist.c | 22 +++--- > libmpathpersist/mpathpr.h | 4 > 2 files changed, 19 insertions(+), 7 deletions(-) > > diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_ > persist.c > index faea2b7..982c795 100644 > --- a/libmpathpersist/mpath_persist.c > +++ b/libmpathpersist/mpath_persist.c > @@ -35,7 +35,6 @@ > #define __STDC_FORMAT_MACROS 1 > > struct udev *udev; > -struct config *conf; > > struct config * > mpath_lib_init (struct udev *udev) > @@ -79,6 +78,7 @@ updatepaths (struct multipath * mpp) > int i, j; > struct pathgroup * pgp; > struct path * pp; > + struct config *conf; > > if (!mpp->pg) > return 0; > @@ -98,16 +98,24 @@ updatepaths (struct multipath * mpp) > continue; > } > pp->mpp = mpp; > + conf = get_multipath_config(); > pathinfo(pp, conf, DI_ALL); > + put_multipath_config(conf); > continue; > } > pp->mpp = mpp; > if (pp->state == PATH_UNCHECKED || > - pp->state == PATH_WILD) > + pp->state == PATH_WILD) { > + conf = get_multipath_config(); > pathinfo(pp, conf, DI_CHECKER); > + put_multipath_config(conf); > + } > > - if (pp->priority == PRIO_UNDEF) > + if (pp->priority == PRIO_UNDEF) { > + conf = get_multipath_config(); > pathinfo(pp, conf, DI_PRIO); > + put_multipath_config(conf); > + } > } > } > return 0; > @@ -160,8 +168,11 @@ int mpath_persistent_reserve_in (int fd, int > rq_servact, > int map_present; > int major, minor; > int ret; > + struct config *conf; > > + conf = get_multipath_config(); > conf->verbosity = verbose; > + put_multipath_config(conf); > > if (fstat( fd, ) != 0){ > condlog(0, "stat error %d", fd); > @@ -253,8 +264,11 @@ int mpath_persistent_reserve_out ( int fd, int > rq_servact, int rq_scope, > int j; > unsigned char *keyp; > uint64_t prkey; > + struct config *conf; > > + conf = get_multipath_config(); > conf->verbosity = verbose; > + put_multipath_config(conf); > > if (fstat( fd, ) != 0){ > condlog(0, "stat error fd=%d", fd); > @@ -321,7 +335,9 @@ int mpath_persistent_reserve_out ( int fd, int > rq_servact, int rq_scope, > goto out1; > } > > + conf = get_multipath_config(); > select_reservation_key(conf, mpp); > + put_multipath_config(conf); > > switch(rq_servact) > { > diff --git a/libmpathpersist/mpathpr.h b/libmpathpersist/mpathpr.h > index 056c547..e6c2ded 100644 > --- a/libmpathpersist/mpathpr.h > +++ b/libmpathpersist/mpathpr.h > @@ -25,10 +25,6 @@ struct threadinfo { > struct prout_param param; > }; > > - > -extern struct config *conf; > - > - > int prin_do_scsi_ioctl(char * dev, int rq_servact, struct prin_resp * > resp, int noisy); > int prout_do_scsi_ioctl( char * dev, int rq_servact, int rq_scope, > unsigned int rq_type, struct prout_param_descriptor > *paramp, int noisy); > -- > 2.8.1.windows.1 > > > -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel