Christophe Varoqui [Wed, 15 Mar 2006 10:15:06 +0000 (11:15 +0100)]
[libmultipath] a bit of code reorganisation
o locking primitives moved to libmultipath/lock.[ch]
o waiter threads control primitives moved to libmultipath/waiter.[ch]
o update_multipath() and queue_mode_{add,del}_path() moved to
libmultipath/structs_vec.c
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
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.
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
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
Christophe Varoqui [Mon, 13 Mar 2006 11:07:24 +0000 (12:07 +0100)]
[multipath] release preparation
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
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
Christophe Varoqui [Sun, 12 Mar 2006 12:51:36 +0000 (13:51 +0100)]
[checkers] emc_clariion checker init() fix
Edward Goggin, EMC
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
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
Christophe Varoqui [Thu, 2 Mar 2006 10:32:17 +0000 (11:32 +0100)]
[libmultipath] "show config" segfault due to checkers framework work
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
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
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
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
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.
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
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
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
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
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.
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
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>
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
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.
Christophe Varoqui [Sun, 22 Jan 2006 16:37:38 +0000 (17:37 +0100)]
[libmultipath] set_default_blacklist() : fix the fix
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.
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.
Christophe Varoqui [Sat, 21 Jan 2006 16:31:19 +0000 (17:31 +0100)]
[libmultipath] correct keyword lookup in snprint_hwentry()
Christophe Varoqui [Sat, 21 Jan 2006 11:36:49 +0000 (12:36 +0100)]
[libmultipath] fix blacklist printing segv when "show config"
Christophe Varoqui [Sat, 21 Jan 2006 10:55:36 +0000 (11:55 +0100)]
[libmultipath] fix uninitialized var in discovery.c:get_serial()
Christophe Varoqui [Sat, 21 Jan 2006 10:30:23 +0000 (11:30 +0100)]
[libmultipath] plug leaks in blacklist free_* functions
Christophe Varoqui [Sat, 21 Jan 2006 10:26:58 +0000 (11:26 +0100)]
[libmultipath] plug leak in discover.c:syfs_get_*()
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'.
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".
Christophe Varoqui [Fri, 20 Jan 2006 14:34:45 +0000 (15:34 +0100)]
[libmultipath] fix new "blacklist" keyword incorrectly spelled to "devnode"
Christophe Varoqui [Fri, 20 Jan 2006 14:33:37 +0000 (15:33 +0100)]
[libmultipath] yet more output prefixing
Christophe Varoqui [Fri, 20 Jan 2006 14:01:58 +0000 (15:01 +0100)]
[libmultipath] move apply_format() from discovery.c to callout.c
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.
Christophe Varoqui [Fri, 20 Jan 2006 11:46:52 +0000 (12:46 +0100)]
[libmultipath] more path: and multipath: output prefixing
Christophe Varoqui [Fri, 20 Jan 2006 11:09:07 +0000 (12:09 +0100)]
[libmultipath] add "map:" prefix to propsel functions output
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"
Christophe Varoqui [Thu, 19 Jan 2006 16:08:10 +0000 (17:08 +0100)]
[config] add the "device" blacklist keyword to config templates
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.
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.
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.
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.
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.
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.
Christophe Varoqui [Wed, 18 Jan 2006 16:06:23 +0000 (17:06 +0100)]
[libmultipath] remove vector.h include from config.h
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.
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 *
}
}
Christophe Varoqui [Tue, 17 Jan 2006 13:52:11 +0000 (14:52 +0100)]
[libmultipath] renaming a map triggers its partitions renames
Christophe Varoqui [Tue, 17 Jan 2006 09:13:29 +0000 (10:13 +0100)]
[multipathd] "show topo" as a "show maps topo" alias
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.
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
Christophe Varoqui [Sun, 15 Jan 2006 16:16:00 +0000 (17:16 +0100)]
Merge branch 'master' of /linux/storage/multipath-tools/
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
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
Christophe Varoqui [Sun, 15 Jan 2006 15:41:38 +0000 (16:41 +0100)]
[libmultipath] add a buffer len param to get_pgpolicy_name()
Christophe Varoqui [Sun, 15 Jan 2006 15:32:51 +0000 (16:32 +0100)]
[libmultipath] do proper string equality checks in dict.c
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.
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.
Christophe Varoqui [Sun, 15 Jan 2006 15:01:38 +0000 (16:01 +0100)]
[libmultipath] add a buffer len param to get_checker_name()
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
Christophe Varoqui [Thu, 5 Jan 2006 22:30:56 +0000 (23:30 +0100)]
[libmultipath] fix the fix
braino.
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.
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
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.
Christophe Varoqui [Mon, 19 Dec 2005 09:26:31 +0000 (10:26 +0100)]
[multipathd] remove unused variable
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
Christophe Varoqui [Sun, 18 Dec 2005 10:53:01 +0000 (11:53 +0100)]
[multipathd] convert another user to find_mp_by_str()
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]
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".
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.
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
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>
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>
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>
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>
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.
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 :/
Christophe Varoqui [Wed, 7 Dec 2005 22:54:04 +0000 (23:54 +0100)]
[kpartx] use lseek64 instead of self-defined syscall
Hannes Reinecke, Suse
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
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
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
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
Christophe Varoqui [Wed, 7 Dec 2005 14:23:55 +0000 (15:23 +0100)]
[libmultipath] add some IBM hardware defaults
Hannes Reinecke, Suse
Christophe Varoqui [Wed, 7 Dec 2005 14:23:06 +0000 (15:23 +0100)]
[priority] new prioritizer for some SGI hardware
Hannes Reinecke, Suse
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
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
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
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
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.
Christophe Varoqui [Tue, 29 Nov 2005 17:01:05 +0000 (18:01 +0100)]
[libmultipath] remove remnents of the old print padding 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
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
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.
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