Re: [PATCH 0/4] minio cleanup patches.

Benjamin Marzinski <[email protected]>
Newsgroups dev.linux.lists.dm-devel
Message-ID <[email protected]>
On Mon, Jun 15, 2026 at 11:00:48PM +0200, Xose Vazquez Perez wrote:
> On 6/15/26 9:07 PM, Benjamin Marzinski wrote:
> 
> > This patchset is to deprecate the rr_weight, rr_min_io_rq, and rr_min_io
> > multipath config options. It's a companion of the patchset to handle
> > their deprecation in the man pages.
> > https://lore.kernel.org/all/[email protected]/
> > 
> > It does not completely remove the minio setting code, since there are
> > ideas for reusing this in the future. The final patch is simply a change
> > to avoid a kernel warning message that I hit while testing these
> > patches.
> > 
> > Benjamin Marzinski (4):
> >    libmultipath: deprecate rr_weight, and make it do nothing
> >    libmultipath: deprecate rr_min_io_rq, and make it do nothing
> >    libmultipath: deprecate rr_min_io
> >    libmultipath: don't set hwhander for bio based devices
> > 
> >   libmultipath/config.c    |  6 ---
> >   libmultipath/config.h    |  6 ---
> >   libmultipath/configure.c |  1 -
> >   libmultipath/defaults.h  |  2 +-
> >   libmultipath/dict.c      | 90 +++++++---------------------------------
> >   libmultipath/dmparser.c  | 28 +------------
> >   libmultipath/hwtable.c   |  3 --
> >   libmultipath/propsel.c   | 54 ++++++------------------
> >   libmultipath/propsel.h   |  1 -
> >   libmultipath/structs.h   |  1 -
> >   tests/hwtable.c          | 13 ++----
> >   tests/test-lib.c         |  1 -
> >   12 files changed, 33 insertions(+), 173 deletions(-)
> > 
> 
> Ben, thanks for this cleanup.
> 
> I ran grep to see what remains of these options in the codebase.
> Could you please check if any of the following occurrences should have been
> removed, or if they are intended to stay for now?
> 
> 8<---
> $ git grep -Ei "rr_weight|minio|min_io" | grep -vE "multipath.conf.5.in|deprecated"
> 

Good catch. It appears I misses some things.

> libmultipath/config.c:  merge_num(minio);
> libmultipath/config.c:  merge_num(minio);
> libmultipath/config.c:  hwe->minio = dhwe->minio;
> libmultipath/config.h:  int minio;
> libmultipath/config.h:  int minio;
> libmultipath/config.h:  int minio;
> libmultipath/configure.c:       select_minio(conf, mpp);
> libmultipath/configure.c:       if (cmpp->minio != mpp->minio) {
> libmultipath/configure.c:               select_reload_action(mpp, "minio change");
> libmultipath/defaults.h:#define DEFAULT_MINIO           1
> libmultipath/defaults.h:#define DEFAULT_MINIO_RQ        1

> libmultipath/defaults.h:#define DEFAULT_RR_WEIGHT       RR_WEIGHT_NONE
> libmultipath/dict.h:int print_rr_weight(struct strbuf *buff, long v);
These were supposed to go.

> libmultipath/dmparser.c:        int minio;
> libmultipath/dmparser.c:        minio = mp->minio;
> libmultipath/dmparser.c:                        if (print_strbuf(&buff, " %s %d", pp->dev_t, minio) < 0)
> libmultipath/dmparser.c:        int def_minio = 0;
> libmultipath/dmparser.c:                                        def_minio = atoi(word);
> libmultipath/dmparser.c:                                        if (def_minio != mpp->minio)
> libmultipath/dmparser.c:                                                mpp->minio = def_minio;
> libmultipath/prioritizers/path_latency.c:#define MIN_IO_NUM             20
> libmultipath/prioritizers/path_latency.c:       if ((io_num < MIN_IO_NUM) || (io_num > MAX_IO_NUM)) {
> libmultipath/propsel.c:select_minio_bio (struct config *conf, struct multipath * mp)
> libmultipath/propsel.c: mp_set_mpe(minio);
> libmultipath/propsel.c: mp_set_ovr(minio);
> libmultipath/propsel.c: mp_set_hwe(minio);
> libmultipath/propsel.c: mp_set_conf(minio);
> libmultipath/propsel.c: mp_set_default(minio, DEFAULT_MINIO);
> libmultipath/propsel.c: condlog(3, "%s: minio = %i %s", mp->alias, mp->minio, origin);
> libmultipath/propsel.c:int select_minio(struct config *conf, struct multipath *mp)
> libmultipath/propsel.c:         return select_minio_bio(conf, mp);

> libmultipath/propsel.c: do_default(mp->minio, DEFAULT_MINIO_RQ);
This should be mp_set_default(). The generated code is the same, but
there's no reason not to use the standard call here.

> libmultipath/propsel.c: condlog(3, "%s: minio = %i %s", mp->alias, mp->minio, origin);
> libmultipath/propsel.h:int select_minio(struct config *conf, struct multipath *mp);

> libmultipath/structs.h:enum rr_weight_mode {
> libmultipath/structs.h: RR_WEIGHT_UNDEF,
> libmultipath/structs.h: RR_WEIGHT_NONE,
> libmultipath/structs.h: RR_WEIGHT_PRIO
More missed rr_weight stuff.

> libmultipath/structs.h: int minio;

> tests/test-lib.c:       /* pretend new dm, use minio_rq,  */
This comment no longer makes any sense, since select_minio no longer
checks the kernel version.

I'll clean these up and resend. If anyone has opinions on what I did
choose to keep around (you could easily make an argument that
DEFAULT_MINIO_RQ should go), let me know.

-Ben

> tests/test-lib.c:       select_minio(conf, mp);
> 8<---
> 
> Regards.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.