platform/upstream/multipath-tools.git
18 years ago[libmultipath] move the tools' version string to the lib
Christophe Varoqui [Tue, 14 Mar 2006 13:06:30 +0000 (14:06 +0100)]
[libmultipath] move the tools' version string to the lib

o Remove multipath/main.h
o Print the version string in the CLI syntax reference

18 years ago[build] minor compilation issues
Christophe Varoqui [Mon, 13 Mar 2006 13:55:16 +0000 (14:55 +0100)]
[build] minor compilation issues

SuSE checker found some minor issues:

- refwwid in libmultipath/configure.c:get_refwwid() might be used
uninitialized. As dev_type is a simple 'int' there is nothing which
prevents the unsuspecting user to call it with an unhandled value.
We shoud rather use an enum and set refwwid to NULL to be on the safe
side.

- attr in libmultipath/discovery.c:devt2devname() might be used
uninitialized. Quite unlikely, but might happen in principle.
So better have it initialized.

- r in multipath/main.c:main() might be used uninitialized.
True. So have it initialized.

18 years ago[build] libmultipath Makefile fix
Christophe Varoqui [Mon, 13 Mar 2006 13:48:09 +0000 (14:48 +0100)]
[build] libmultipath Makefile fix

libmultipath/Makefile resets CFLAGS, so we can't pass anything from the
top-level makefile.

Hannes Reinecke, SuSE

18 years ago[libmultipath] IBM defaults tweaks
Christophe Varoqui [Mon, 13 Mar 2006 13:46:53 +0000 (14:46 +0100)]
[libmultipath] IBM defaults tweaks

There is a new hardware ID for the IBM F20; and I've also switched to
'dasd_id' from udev instead of dasdview from s390-tools.

Hannes Reinecke, SuSE

18 years ago[multipath] release preparation 0.4.7
Christophe Varoqui [Mon, 13 Mar 2006 11:07:24 +0000 (12:07 +0100)]
[multipath] release preparation

18 years ago[libmultipath] add pathcountgr() helper function
Christophe Varoqui [Sun, 12 Mar 2006 14:16:40 +0000 (15:16 +0100)]
[libmultipath] add pathcountgr() helper function

Teach pathcount() to use it.

Edward Goggin, EMC

18 years ago[multipathd] add more checkers message printing upon path failures
Christophe Varoqui [Sun, 12 Mar 2006 13:29:27 +0000 (14:29 +0100)]
[multipathd] add more checkers message printing upon path failures

Edward Goggin, EMC

18 years ago[checkers] emc_clariion checker init() fix
Christophe Varoqui [Sun, 12 Mar 2006 12:51:36 +0000 (13:51 +0100)]
[checkers] emc_clariion checker init() fix

Edward Goggin, EMC

18 years ago[checkers] checker_put() to exec the free fn only if one is registered
Christophe Varoqui [Sun, 12 Mar 2006 12:49:12 +0000 (13:49 +0100)]
[checkers] checker_put() to exec the free fn only if one is registered

Edward Goggin, EMC

18 years ago[multipathd] ev_add_map should return ok for spurious events
Christophe Varoqui [Thu, 2 Mar 2006 11:09:02 +0000 (12:09 +0100)]
[multipathd] ev_add_map should return ok for spurious events

Benjamin Marzinski, Redhat

18 years ago[libmultipath] "show config" segfault due to checkers framework work
Christophe Varoqui [Thu, 2 Mar 2006 10:32:17 +0000 (11:32 +0100)]
[libmultipath] "show config" segfault due to checkers framework work

18 years ago[libmultipath] per-hwentry product string blacklist
Christophe Varoqui [Thu, 2 Mar 2006 10:31:23 +0000 (11:31 +0100)]
[libmultipath] per-hwentry product string blacklist

Associate a default blacklist product string with each hwentry.
This is useful for the CLARiiON in order to blacklist LUNZ entries
by default.

Edward Goggin, EMC

18 years ago[libmultipath] pathinfo() should not try get_prio() if path is down
Christophe Varoqui [Thu, 2 Mar 2006 10:07:55 +0000 (11:07 +0100)]
[libmultipath] pathinfo() should not try get_prio() if path is down

David Wysochanski, Netapp
Edward Goggin, EMC

18 years ago[libmultipath] cycling remove/add a map leaks paths info
Christophe Varoqui [Sat, 25 Feb 2006 14:10:03 +0000 (15:10 +0100)]
[libmultipath] cycling remove/add a map leaks paths info

When you delete a multipath map, orphaning the path clears out some members
of the path structure.  Adding that map again doesn't bring them back.
Specifically, you loose your checker file descriptor.

The attached patch restores most of the members. It doesn't reset getuid.

Benjamin Marzinski, Redhat

18 years ago[multipathd] syncing path states
Christophe Varoqui [Tue, 21 Feb 2006 22:52:00 +0000 (23:52 +0100)]
[multipathd] syncing path states

Occasionally, the path states for multipathd and device mapper are out of
sync.
This happens either when multipathd starts, or after a multipath map is
created or reloaded (what a path is added or removed, or a map is added).
The attached patch syncs the paths' dmstate with it's state after one of
these actions happens.

Benjamin Marzinski, Redhat

18 years ago[multipathd] nr_active inc/dec losts or overzealous
Christophe Varoqui [Fri, 17 Feb 2006 23:10:49 +0000 (00:10 +0100)]
[multipathd] nr_active inc/dec losts or overzealous

There is some weirdness in the nr_active handling in multipathd, For
instance, whenever you change state to a PATH_DOWN or PATH_SHAKY state,
you decrement the number of active paths, even if you change from
PATH_DOWN to PATH_SHAKY.

This patch attempts to fix the problem.  It slightly changes how some
of the states are handled.

18 years ago[multipathd] due failback not happening
Christophe Varoqui [Fri, 17 Feb 2006 22:58:26 +0000 (23:58 +0100)]
[multipathd] due failback not happening

If the failback period is set to more that four times the polling interval,
paths will never fail back. This is because the failback_tick keeps getting
reset. The attached patch fixes this.

Benjamin Marzinski, Redhat

18 years ago[multipathd] blacklisting and blacklist changes ignored on spots
Christophe Varoqui [Fri, 17 Feb 2006 22:55:44 +0000 (23:55 +0100)]
[multipathd] blacklisting and blacklist changes ignored on spots

multipathd doesn't correctly blacklist devices by wwid, because the
blacklist check happens before the device information is known.

This patch fixes that.

Benjamin Marzinski, Redhat

18 years ago[build] fix install target glitch in alua prioritizer
Christophe Varoqui [Fri, 17 Feb 2006 22:47:37 +0000 (23:47 +0100)]
[build] fix install target glitch in alua prioritizer

Triggered by "make rpm" on fresh systems.
Spotted and fixed by Brian Wong, Pillardata

18 years ago[checkers] fix segfault in the checker lookup function
Christophe Varoqui [Tue, 14 Feb 2006 08:03:19 +0000 (09:03 +0100)]
[checkers] fix segfault in the checker lookup function

Multipath was segfaulting on startup because of some pointer arithmatic
craziness with the checkers. The attached patch fixes it.

Benjamin Marzinski, Redhat

18 years ago[checkers] API rewrite
Christophe Varoqui [Mon, 13 Feb 2006 10:33:31 +0000 (11:33 +0100)]
[checkers] API rewrite

The context handling and the layering were poor, so rewrite.

The users now need to :

- alloc a "struct checker"
- select a checker by name : checker_lookup()
- init own checker instance : checker_get()
- set the path file descriptor to check : checker_set_fd()
- use : checker_check()
- release : checker_put()

Checkers now are asked to provide 3 functions :

- foo_init : alloc and initialize the checker context
- foo_free : free the context
- foo      : the checking function proper

These 3 are registered in a static checkers array, along with the checker
name. Lookups are based on checker name.

The users are all updated :

- checker_get is folded into path (re)discovery
- checker_put is folded into path free/orphan

Additional gains :

- directio is updated to use a context to avoid computations upon each
  check
- checkers code is leaner

Please test and report.

18 years agoMerge with http://137.250.31.225/rsync/git/linux/storage/multipath-tools.git
Christophe Varoqui [Thu, 9 Feb 2006 22:12:51 +0000 (23:12 +0100)]
Merge ... 137.250.31.225/rsync/git/linux/storage/multipath-tools.git

18 years ago[kpartx] Add support for mac partition table
Bastian Blank [Thu, 9 Feb 2006 17:22:18 +0000 (17:22 +0000)]
[kpartx] Add support for mac partition table

Signed-off-by: Bastian Blank <waldi@debian.org>
18 years ago[build] make rpm fix
Christophe Varoqui [Thu, 9 Feb 2006 11:31:19 +0000 (12:31 +0100)]
[build] make rpm fix

Adaptation to new prioritizer and path changes

Brian Wong, Pillardata

18 years ago[libmultipath] discovery broken for DASD
Christophe Varoqui [Thu, 2 Feb 2006 16:16:19 +0000 (17:16 +0100)]
[libmultipath] discovery broken for DASD

Since I moved the configlet setting right after vendor/product string
fetching in sysfs_scsi_pathinfo() and forgot about its *ccw* counterpart.

Stefan Weinhuber and Stefan Bader spotted and fixed that.

18 years ago[libmultipath] set_default_blacklist() : fix the fix
Christophe Varoqui [Sun, 22 Jan 2006 16:37:38 +0000 (17:37 +0100)]
[libmultipath] set_default_blacklist() : fix the fix

18 years ago[libmultipath] set_default_blacklist() should not register .rodata strings
Christophe Varoqui [Sun, 22 Jan 2006 16:17:19 +0000 (17:17 +0100)]
[libmultipath] set_default_blacklist() should not register .rodata strings

... because free_blacklist will try to free those strings, and some glibc
are set to be verbose about that by default.

18 years ago[libmultipath] snprint_hw_prio_callout() segv
Christophe Varoqui [Sat, 21 Jan 2006 16:47:34 +0000 (17:47 +0100)]
[libmultipath] snprint_hw_prio_callout() segv

... if prio_callout is not defined in the default config section.

18 years ago[libmultipath] correct keyword lookup in snprint_hwentry()
Christophe Varoqui [Sat, 21 Jan 2006 16:31:19 +0000 (17:31 +0100)]
[libmultipath] correct keyword lookup in snprint_hwentry()

18 years ago[libmultipath] fix blacklist printing segv when "show config"
Christophe Varoqui [Sat, 21 Jan 2006 11:36:49 +0000 (12:36 +0100)]
[libmultipath] fix blacklist printing segv when "show config"

18 years ago[libmultipath] fix uninitialized var in discovery.c:get_serial()
Christophe Varoqui [Sat, 21 Jan 2006 10:55:36 +0000 (11:55 +0100)]
[libmultipath] fix uninitialized var in discovery.c:get_serial()

18 years ago[libmultipath] plug leaks in blacklist free_* functions
Christophe Varoqui [Sat, 21 Jan 2006 10:30:23 +0000 (11:30 +0100)]
[libmultipath] plug leaks in blacklist free_* functions

18 years ago[libmultipath] plug leak in discover.c:syfs_get_*()
Christophe Varoqui [Sat, 21 Jan 2006 10:26:58 +0000 (11:26 +0100)]
[libmultipath] plug leak in discover.c:syfs_get_*()

18 years ago[config] synthetic template mispelled the "user_friendly_names" keyword
Christophe Varoqui [Fri, 20 Jan 2006 23:29:17 +0000 (00:29 +0100)]
[config] synthetic template mispelled the "user_friendly_names" keyword

Missed the ending 's'.

18 years ago[libmultipath] "show conf" CLI command to output the blacklist too
Christophe Varoqui [Fri, 20 Jan 2006 15:09:03 +0000 (16:09 +0100)]
[libmultipath] "show conf" CLI command to output the blacklist too

All multipath.conf keywords and sections are now covered by "show conf".

18 years ago[libmultipath] fix new "blacklist" keyword incorrectly spelled to "devnode"
Christophe Varoqui [Fri, 20 Jan 2006 14:34:45 +0000 (15:34 +0100)]
[libmultipath] fix new "blacklist" keyword incorrectly spelled to "devnode"

18 years ago[libmultipath] yet more output prefixing
Christophe Varoqui [Fri, 20 Jan 2006 14:33:37 +0000 (15:33 +0100)]
[libmultipath] yet more output prefixing

18 years ago[libmultipath] move apply_format() from discovery.c to callout.c
Christophe Varoqui [Fri, 20 Jan 2006 14:01:58 +0000 (15:01 +0100)]
[libmultipath] move apply_format() from discovery.c to callout.c

18 years ago[libmultipath] don't set the hwe configlet pointer if !(mask & DI_SYSFS)
Christophe Varoqui [Fri, 20 Jan 2006 13:53:12 +0000 (14:53 +0100)]
[libmultipath] don't set the hwe configlet pointer if !(mask & DI_SYSFS)

Vendor and product strings are fetched if (mask & DI_SYSFS).

We shouldn't even try to find_hwe(vendor, product) if there is a chance
the params are not set.

18 years ago[libmultipath] more path: and multipath: output prefixing
Christophe Varoqui [Fri, 20 Jan 2006 11:46:52 +0000 (12:46 +0100)]
[libmultipath] more path: and multipath: output prefixing

18 years ago[libmultipath] add "map:" prefix to propsel functions output
Christophe Varoqui [Fri, 20 Jan 2006 11:09:07 +0000 (12:09 +0100)]
[libmultipath] add "map:" prefix to propsel functions output

18 years ago[libmultipath] path discovery reorganisation
Christophe Varoqui [Fri, 20 Jan 2006 10:54:21 +0000 (11:54 +0100)]
[libmultipath] path discovery reorganisation

o split logic in smaller functions
o prefix output with "%s:...", pp->dev
o rename "curpath" to "pp"

18 years ago[config] add the "device" blacklist keyword to config templates
Christophe Varoqui [Thu, 19 Jan 2006 16:08:10 +0000 (17:08 +0100)]
[config] add the "device" blacklist keyword to config templates

18 years ago[libmultipath] adapt discover.c to the new libsysfs2 API
Christophe Varoqui [Thu, 19 Jan 2006 15:51:09 +0000 (16:51 +0100)]
[libmultipath] adapt discover.c to the new libsysfs2 API

In fact, I tried to use only the functions common to libsysfs v1 and v2.

18 years ago[libmultipath] rename conf->default_hwhandler to conf->hwhandler
Christophe Varoqui [Wed, 18 Jan 2006 16:30:17 +0000 (17:30 +0100)]
[libmultipath] rename conf->default_hwhandler to conf->hwhandler

Misleading name. The real default is DEFAULT_HWHANDLER.

18 years ago[libmultipath] rename conf->default_getprio to conf->getprio
Christophe Varoqui [Wed, 18 Jan 2006 16:27:43 +0000 (17:27 +0100)]
[libmultipath] rename conf->default_getprio to conf->getprio

Misleading name. The real default is DEFAULT_GETPRIO.

18 years ago[libmultipath] rename conf->default_getuid to conf->getuid
Christophe Varoqui [Wed, 18 Jan 2006 16:24:24 +0000 (17:24 +0100)]
[libmultipath] rename conf->default_getuid to conf->getuid

Misleading name. The real default is DEFAULT_GETUID.

18 years ago[libmultipath] rename conf->default_checker_index to conf->checker_index
Christophe Varoqui [Wed, 18 Jan 2006 16:16:55 +0000 (17:16 +0100)]
[libmultipath] rename conf->default_checker_index to conf->checker_index

Misleading name. The real default is DEFAULT_CHECKER_ID.

18 years ago[libmultipath] rename conf->default_pgpolicy to conf->pgpolicy
Christophe Varoqui [Wed, 18 Jan 2006 16:14:33 +0000 (17:14 +0100)]
[libmultipath] rename conf->default_pgpolicy to conf->pgpolicy

Misleading name. The real default is DEFAULT_PGPOLICY.

18 years ago[libmultipath] remove vector.h include from config.h
Christophe Varoqui [Wed, 18 Jan 2006 16:06:23 +0000 (17:06 +0100)]
[libmultipath] remove vector.h include from config.h

18 years ago[libmultipath] deprecate the "devnode_blacklist" keyword
Christophe Varoqui [Wed, 18 Jan 2006 11:20:51 +0000 (12:20 +0100)]
[libmultipath] deprecate the "devnode_blacklist" keyword

Please use the "blacklist" keyword instead.

The blacklist section implements the "devnode", "wwid" and "device"
keywords, so it's misleading to keep the old section name.

18 years ago[libmultipath] add device blacklisting
Christophe Varoqui [Wed, 18 Jan 2006 11:07:26 +0000 (12:07 +0100)]
[libmultipath] add device blacklisting

Syntax is :

devnode_blacklist {
devnode sr*
wwid 6005*
device {
vendor DEC
product *
}
}

18 years ago[libmultipath] renaming a map triggers its partitions renames
Christophe Varoqui [Tue, 17 Jan 2006 13:52:11 +0000 (14:52 +0100)]
[libmultipath] renaming a map triggers its partitions renames

18 years ago[multipathd] "show topo" as a "show maps topo" alias
Christophe Varoqui [Tue, 17 Jan 2006 09:13:29 +0000 (10:13 +0100)]
[multipathd] "show topo" as a "show maps topo" alias

18 years ago[multipathd] add "show config" CLI command
Christophe Varoqui [Tue, 17 Jan 2006 09:08:49 +0000 (10:08 +0100)]
[multipathd] add "show config" CLI command

This commands dumps a multipath.conf config file.

The "defaults" section is factorized : settings in sync with the internal
defaults are not printed.

The "devices" section lists the internal hwtable, plus mods and adds from
the actual config file. The layout is factorized : settings in sync with
the "defaults" section are not printed.

The "devnode_blacklist" section is ommited for now, as this requires a bit
more infrastructure.

The "multipaths" section is not factorized as we can not reliably guess the
hardware a multipath is parented to. Multipath entries are just clones
of their actual config file equivalent.

18 years ago[libmultipath] add internal some defaults handling to propsel.c
Christophe Varoqui [Mon, 16 Jan 2006 15:44:40 +0000 (16:44 +0100)]
[libmultipath] add internal some defaults handling to propsel.c

o getprio
o checker_index
o getuid

18 years agoMerge branch 'master' of http://kernel.org/pub/scm/linux/storage/multipath-tools/
Christophe Varoqui [Sun, 15 Jan 2006 16:16:00 +0000 (17:16 +0100)]
Merge branch 'master' of /linux/storage/multipath-tools/

18 years ago[libmultipath] fix the internal defaults loading
Christophe Varoqui [Sun, 15 Jan 2006 15:47:51 +0000 (16:47 +0100)]
[libmultipath] fix the internal defaults loading

hwtable.c segfaults : the increment of the hwe pointer is wrong

Mark Haverkamp, OSDL

18 years ago[libmultipath] STK D280 to use the tpc prioritizer
Christophe Varoqui [Sun, 15 Jan 2006 15:45:09 +0000 (16:45 +0100)]
[libmultipath] STK D280 to use the tpc prioritizer

Align the defaults to SGI TP4500 ones.

Suggested by Chris Penney

18 years ago[libmultipath] add a buffer len param to get_pgpolicy_name()
Christophe Varoqui [Sun, 15 Jan 2006 15:41:38 +0000 (16:41 +0100)]
[libmultipath] add a buffer len param to get_pgpolicy_name()

18 years ago[libmultipath] do proper string equality checks in dict.c
Christophe Varoqui [Sun, 15 Jan 2006 15:32:51 +0000 (16:32 +0100)]
[libmultipath] do proper string equality checks in dict.c

18 years ago[libmultipath] move CHECKINT definition to defaults.h
Christophe Varoqui [Sun, 15 Jan 2006 15:20:08 +0000 (16:20 +0100)]
[libmultipath] move CHECKINT definition to defaults.h

And transform MAX_CHECKINT into a macro.

Use that in dict.c to set conf->max_checkint with the same formula we
use when we set the in-core default.

18 years ago[libmultipath] define more defaults to defaults.h
Christophe Varoqui [Sun, 15 Jan 2006 15:10:36 +0000 (16:10 +0100)]
[libmultipath] define more defaults to defaults.h

And use them in propsel.c when appropriate.

18 years ago[libmultipath] add a buffer len param to get_checker_name()
Christophe Varoqui [Sun, 15 Jan 2006 15:01:38 +0000 (16:01 +0100)]
[libmultipath] add a buffer len param to get_checker_name()

18 years ago[build] adapt to new "make" rules
Christophe Varoqui [Sun, 15 Jan 2006 14:24:21 +0000 (15:24 +0100)]
[build] adapt to new "make" rules

compatibility with the new make's line continuation rules.

Steve Langasek

18 years ago[libmultipath] fix the fix
Christophe Varoqui [Thu, 5 Jan 2006 22:30:56 +0000 (23:30 +0100)]
[libmultipath] fix the fix

braino.

18 years ago[libmultipath] fix segfault on dlog() format violation
Christophe Varoqui [Thu, 5 Jan 2006 22:25:38 +0000 (23:25 +0100)]
[libmultipath] fix segfault on dlog() format violation

Noticed by Kiyoshi Ueda, NEC
Alasdair Kergon, Redhat, suggested the compilation checking.

18 years ago[multipathd] 'show maps xxx' CLI tweaks
Christophe Varoqui [Mon, 2 Jan 2006 10:24:16 +0000 (11:24 +0100)]
[multipathd] 'show maps xxx' CLI tweaks

o rename PRINT_MAP_FAILBACK to PRINT_MAP_STATUS
o 'print maps' command renamed to 'print maps status'
o 'print maps' now use the PRINT_MAP_NAMES layout, ie name|dm_name|wwid
o remove the dm_name field from PRINT_MAP_STATUS and PRINT_MAP_STATS

18 years ago[libmultipath] hardware defaults framework overhaul
Christophe Varoqui [Mon, 19 Dec 2005 14:48:41 +0000 (15:48 +0100)]
[libmultipath] hardware defaults framework overhaul

- Access to all "struct hwentry" parameters
- Removes old store_hwe{_ext} functions
- Remove unused selector_args param in all config.h structs
- Add hardware family maintainership banner, and pre-populate
- Move hardcoded minio in a defaults.h:DEFAULT_MINIO define

Please verify I didn't mess the defaults for hardware you care about,
and start claiming maintainership.

18 years ago[multipathd] remove unused variable
Christophe Varoqui [Mon, 19 Dec 2005 09:26:31 +0000 (10:26 +0100)]
[multipathd] remove unused variable

18 years ago[multipathd] "multipath" is a "map" synonym
Christophe Varoqui [Mon, 19 Dec 2005 09:25:08 +0000 (10:25 +0100)]
[multipathd] "multipath" is a "map" synonym

Like "multipaths" is a "maps" synonym

18 years ago[multipathd] convert another user to find_mp_by_str()
Christophe Varoqui [Sun, 18 Dec 2005 10:53:01 +0000 (11:53 +0100)]
[multipathd] convert another user to find_mp_by_str()

18 years ago[multipathd] add "show map $map topo" CLI command
Christophe Varoqui [Sun, 18 Dec 2005 10:46:43 +0000 (11:46 +0100)]
[multipathd] add "show map $map topo" CLI command

multipathd> sho map dm-1 topo
mpath0 (149455400000000000000000000000000d00600000b000000)
[size=67 GB][features=1 queue_if_no_path][hwhandler=0]
\_ round-robin 0 [prio=10][enabled]
 \_ 3:0:0:1 sdb 8:16 [active][ready]
\_ round-robin 0 [prio=6][enabled]
 \_ 4:0:0:1 sde 8:64 [active][ready]

and :

multipathd> sho map mpath0 topo
mpath0 (149455400000000000000000000000000d00600000b000000)
[size=67 GB][features=1 queue_if_no_path][hwhandler=0]
\_ round-robin 0 [prio=0][enabled]
 \_ 3:0:0:1 sdb 8:16 [active][ready]
\_ round-robin 0 [prio=0][enabled]
 \_ 4:0:0:1 sde 8:64 [active][ready]

18 years ago[multipathd] allow shortcut in CLI syntax
Christophe Varoqui [Fri, 16 Dec 2005 21:07:13 +0000 (22:07 +0100)]
[multipathd] allow shortcut in CLI syntax

For example "li maps topo" is allowed and synonymous of "list maps
topology".

18 years ago[multipathd] change last CLI command syntax
Christophe Varoqui [Fri, 16 Dec 2005 20:48:37 +0000 (21:48 +0100)]
[multipathd] change last CLI command syntax

"show multipaths" was confusing because "show maps" looks so awfuly close.

Now :
1) "multipaths" is a "maps" synomym
2) "show multipaths topology" shows what "show multipaths" did

There is a bit of function naming sanitizing in the lib too.

18 years ago[libmultipath] tweaks for IBM / SGI common hardware
Christophe Varoqui [Tue, 13 Dec 2005 13:46:53 +0000 (14:46 +0100)]
[libmultipath] tweaks for IBM / SGI common hardware

here's a small update for the hardware table.

I've added a new controller (IBM DS4100), which uses the same controller
than SGI TPC. For a proper support I had to relax the checks in pp_tpc
slightly.

Secondly, it sets the FAILBACK for all machines supported by pp_tpc to
-FAILBACK_IMMEDIATE, as we cannot (yet) adjust the path setting. Hence
we need to switch back to the preferred path as soon as it becomes
available again.

Hannes Reinecke, Suse

18 years ago[build] Makefile cleanup
Christophe Varoqui [Fri, 9 Dec 2005 16:02:27 +0000 (17:02 +0100)]
[build] Makefile cleanup

Fixup CFLAGS so that it can be adjusted by setting 'OPTFLAGS'
from the commandline.
General cleanup of Makefiles; move common parts into Makefile.inc.

Signed-off-by: Hannes Reinecke <hare@suse.de>
18 years ago[devmapper] Compilation fixes
Christophe Varoqui [Fri, 9 Dec 2005 15:59:57 +0000 (16:59 +0100)]
[devmapper] Compilation fixes

As we're returning a strdup()ed string from dm_mapname() it hardly
qualifies as 'const'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
18 years ago[kpartx] Add suport for S/390 ECKD DASD
Christophe Varoqui [Fri, 9 Dec 2005 15:58:53 +0000 (16:58 +0100)]
[kpartx] Add suport for S/390 ECKD DASD

This patch adds support for S/390 ECKD DASD partition tables.

Signed-off-by: Hannes Reinecke <hare@suse.de>
18 years ago[devmapper] Check mapname length
Christophe Varoqui [Fri, 9 Dec 2005 15:54:48 +0000 (16:54 +0100)]
[devmapper] Check mapname length

dm_task_get_name might return a zero-length string, which also
seem to indicate an invalid mapname. Fix dm_mapname() to always
return NULL if either no mapname or an zero-length mapname
was returned.

Signed-off-by: Hannes Reinecke <hare@suse.de>
18 years ago[multipathd] add "show multipaths" CLI command
Christophe Varoqui [Fri, 9 Dec 2005 15:40:53 +0000 (16:40 +0100)]
[multipathd] add "show multipaths" CLI command

Mimics the 'multipath -ll' output in the CLI.

18 years ago[libmultipath] groundwork to share print_mp() between multipath & deamon
Christophe Varoqui [Fri, 9 Dec 2005 15:39:10 +0000 (16:39 +0100)]
[libmultipath] groundwork to share print_mp() between multipath & deamon

Introduce snprint_mp() and teach print_mp() to use it.

print_mp() uses a 64 lines buffer, which mean multipath(8) can only
print 62 "paths or pathgroup". Daemon will use the buffer doubling
trick to work around that.

You are allowed to report your unhappiness about this default :/

18 years ago[kpartx] use lseek64 instead of self-defined syscall
Christophe Varoqui [Wed, 7 Dec 2005 22:54:04 +0000 (23:54 +0100)]
[kpartx] use lseek64 instead of self-defined syscall

Hannes Reinecke, Suse

18 years ago[priority] new prioritizer for some SGI hardware (take 2)
Christophe Varoqui [Wed, 7 Dec 2005 22:40:41 +0000 (23:40 +0100)]
[priority] new prioritizer for some SGI hardware (take 2)

Add to files for real.

Hannes Reinecke, Suse

18 years ago[libmultipath] add DASD discovery profile
Christophe Varoqui [Wed, 7 Dec 2005 22:39:01 +0000 (23:39 +0100)]
[libmultipath] add DASD discovery profile

Make DASD fits the vendor/product scsi-ism the tools use to
index its hardware table.

Hannes Reinecke, Suse

18 years ago[multipathd] adjust oom_adj to the 2.6.14 standards
Christophe Varoqui [Wed, 7 Dec 2005 22:29:38 +0000 (23:29 +0100)]
[multipathd] adjust oom_adj to the 2.6.14 standards

As of 2.6.14, the kernel will only accept oom_adj values of > -17.
Writing '-17' into oom_adj will be ignored. This patch fixes the
value to -16.

Hannes Reinecke, Suse

18 years ago[libmultipath] SGI hardware defaults tuning
Christophe Varoqui [Wed, 7 Dec 2005 22:23:32 +0000 (23:23 +0100)]
[libmultipath] SGI hardware defaults tuning

Switch TPs to GROUP_BY_PRIO now that we have a priority checker

That enables multiple paths to the prefered array port to
be grouped together and load-balanced. I'll do that and see if users get
annoyed.

Suggested by Hannes Reinecke, Suse

18 years ago[libmultipath] add some IBM hardware defaults
Christophe Varoqui [Wed, 7 Dec 2005 14:23:55 +0000 (15:23 +0100)]
[libmultipath] add some IBM hardware defaults

Hannes Reinecke, Suse

18 years ago[priority] new prioritizer for some SGI hardware
Christophe Varoqui [Wed, 7 Dec 2005 14:23:06 +0000 (15:23 +0100)]
[priority] new prioritizer for some SGI hardware

Hannes Reinecke, Suse

18 years ago[kpartx] bug fixes for dos extended partition [4/4]
Christophe Varoqui [Thu, 1 Dec 2005 20:58:49 +0000 (21:58 +0100)]
[kpartx] bug fixes for dos extended partition [4/4]

There is meaninglessly duplicated code in read_dos_pt().
It should be safe to remove it.

un'ichi "Nick" Nomura, NEC

18 years ago[kpartx] bug fixes for dos extended partition [3/4]
Christophe Varoqui [Thu, 1 Dec 2005 20:57:29 +0000 (21:57 +0100)]
[kpartx] bug fixes for dos extended partition [3/4]

in the for loop in read_extended_partition,
'here' is updated if the next extended partition is found.

However, the 'here' value should be updated in the next while loop.
Otherwise it's possible that following partition table
entry refers updated value and generate wrong mapping.

I'm not sure if there is any partitioning tool which can generate
such table. But it's safer to fix this.

Jun'ichi Nomura, NEC

18 years ago[kpartx] bug fixes for dos extended partition [2/4]
Christophe Varoqui [Thu, 1 Dec 2005 20:54:15 +0000 (21:54 +0100)]
[kpartx] bug fixes for dos extended partition [2/4]

kpartx usually doesn't create a mapping for extended partition.
However, it does if it's empty.
It's harmless but not consistent.
Attached patch makes it consistent by not creating a mapping
even when the extended partition is empty.

Please consider to apply.

If you have logical partitions in extended partition:
# parted /dev/sdc p
Disk geometry for /dev/sdc: 0.000-34686.000 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          7.844     31.376  extended
5          7.875     23.532  logical

No mapping is created for extended partition:
# dmsetup table|grep sdc|sort
  sdc5: 0 32067 linear 8:32 16128

However, if the extended partition is empty:
# parted /dev/sdc p
Disk geometry for /dev/sdc: 0.000-34686.000 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
1          7.844     31.376  extended

The following mapping is created:
# dmsetup table|grep sdc|sort
  sdc1: 0 48195 linear 8:32 16065

Jun'ichi Nomura, NEC

18 years ago[kpartx] bug fixes for dos extended partition [1/4]
Christophe Varoqui [Thu, 1 Dec 2005 20:50:27 +0000 (21:50 +0100)]
[kpartx] bug fixes for dos extended partition [1/4]

the latest kpartx generates wrong mapping for
MS-DOS extended partitions.
Attached patch fixes the problem.
Please consider to apply.

Consider you created the following partition table.
# parted /dev/sdc p
Disk geometry for /dev/sdc: 0.000-34686.000 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
  1          0.031      7.844  primary
  2          7.844     31.376  extended
  5          7.875     23.532  logical
  6         23.563     31.376  logical

kpartx should generate the following mappings:
# dmsetup table|grep sdc|sort
  sdc1: 0 16002 linear 8:32 63
  sdc5: 0 32067 linear 8:32 16128
  sdc6: 0 16002 linear 8:32 48258

However, actually it generates:
# dmsetup table|grep sdc|sort
  sdc1: 0 16002 linear 8:32 63
  sdc5: 0 32067 linear 8:32 16128
  sdc6: 0 16065 linear 8:32 80325
  sdc7: 0 16002 linear 8:32 48258

Jun'ichi Nomura, NEC

18 years ago[multipathd] move show_{paths,maps} in cli_handlers.c
Christophe Varoqui [Wed, 30 Nov 2005 08:52:12 +0000 (09:52 +0100)]
[multipathd] move show_{paths,maps} in cli_handlers.c

Near their users.

18 years ago[libmultipath] remove remnents of the old print padding framework
Christophe Varoqui [Tue, 29 Nov 2005 17:01:05 +0000 (18:01 +0100)]
[libmultipath] remove remnents of the old print padding framework

18 years ago[libmultipath] extend the printing framework
Christophe Varoqui [Tue, 29 Nov 2005 16:35:33 +0000 (17:35 +0100)]
[libmultipath] extend the printing framework

- for pathgroup information printing
- for print_mp() start of integration

18 years ago[libmultipath] sysfs_get_size() returning 0 is not necessarily an error
Christophe Varoqui [Tue, 29 Nov 2005 14:14:49 +0000 (15:14 +0100)]
[libmultipath] sysfs_get_size() returning 0 is not necessarily an error

0-sized devices exist in real life but sysfs_get_size() returns 0 on
errors.

Current behaviour cascade the failure in :

- sysfs_get_size
- up to sysfs_pathinfo
- up to pathinfo
- up to discovery

Not fair at all.

So feed the &size as sysfs_get_size() parameter and use the return code
only to report status to caller.

Noted by Maxim Kozover

18 years ago[libmultipath] remove math lib dependency
Christophe Varoqui [Tue, 29 Nov 2005 10:08:39 +0000 (11:08 +0100)]
[libmultipath] remove math lib dependency

The new printing framework does not need the math lib anymore.
So remove it from the includes and Makefiles.

18 years ago[libmultipath] drop the path cache
Christophe Varoqui [Tue, 29 Nov 2005 10:05:08 +0000 (11:05 +0100)]
[libmultipath] drop the path cache

- remove the cache library files
- remove the cache loading in multipath
- remove the "dump pathvec" facility in multipathd
- remove a small cache assertion in the discovery

18 years ago[libmultipath] max column size incorrectly trimed to 32 in previous patch
Christophe Varoqui [Tue, 29 Nov 2005 08:55:41 +0000 (09:55 +0100)]
[libmultipath] max column size incorrectly trimed to 32 in previous patch

Set it back to 64 to enable display of full wwid fields.