root [Mon, 11 Dec 2006 23:05:13 +0000 (00:05 +0100)]
[libmultipath] devmapper prereq detection overhault
o fix testing logic (1.2.0 now satisfies 1.1.1 prereq)
o add libdevmapper prereq testing
o split dm_prereq() in dm_libprereq() and dm_drvprereq()
o bring back min version settings in devmapper.c
o bump libdevmapper prereq to 1.02.11 (in preparation of no_flush use)
root [Mon, 11 Dec 2006 21:07:56 +0000 (22:07 +0100)]
[kpartx] fix partition calculations of DASD partitions
This patch fixes the offset and length calcuations for DASD partitions
with either CMS (without explicit offset), the old linux disk layout or
no partition information at all if the devices are using a blocksize
bigger than 512B.
In the cases mentioned above the offset was normalized (to the number of
512B sectors) twice and the size reduced by the normalized offset and
again by the double normalized offset later.
This leads to kpartx defining the wrong limits in these cases.
Signed-off-by: Stefan Bader <shbader@de.ibm.com>
Christophe Varoqui [Wed, 6 Dec 2006 22:22:07 +0000 (23:22 +0100)]
[multipath] correctness "multipath -ll" fix
follow-up
Edward Goggin, EMC
Christophe Varoqui [Mon, 27 Nov 2006 22:12:04 +0000 (23:12 +0100)]
[multipath] correctness "multipath -ll" fix
Just a simple change to multipath/main.c:update_paths()
to set the mpp field of each path so that the immediately
following call to pathinfo() will call get_state() on a
path with its mpp field set. This enables "multipath -ll"
to utilize the shared context field of the multipath struct.
Edward Goggin, EMC
Christophe Varoqui [Mon, 27 Nov 2006 22:06:36 +0000 (23:06 +0100)]
[libmultipath] fix user_friendly_names race
Without this patch I could fairly easily get two multipath mpath0 entries
in /var/lib/multipath/bindings by running 8 concurrent instances of
multipath(8) while with the patch I cannot get this problem to occur.
The posix file byte range locks used to provide atomicity for accessing the
entries in the multipath bindings file get released from whenever __any__
descriptor or FILE structure for that file is closed. This patch delays
the fclose() for the FILE structures used within lookup_binding() and
rlookup_binding() until there is no more need for the atomicity.
Edward Goggin, EMC
Christophe Varoqui [Mon, 27 Nov 2006 21:53:28 +0000 (22:53 +0100)]
[multipathd] man page update
Add CLI commands description.
Volker Sameske, IBM
Christophe Varoqui [Thu, 23 Nov 2006 23:26:43 +0000 (00:26 +0100)]
[libmultipath] tweak defaults for DDN S2A8500
When using multipath-tools 0.4.7, I would like to reports that DDN S2A8500
disk array reports a wrong status whith 'readsector0' checker. 'directio'
seems to be the right checker for such storage system.
Frederic Temporelli, Bull
Christophe Varoqui [Thu, 23 Nov 2006 23:06:23 +0000 (00:06 +0100)]
[checkers] handling CLARiiON I/O to inactive snapshot logical units
Prevent an I/O hang which can occur with host I/O to an inactive CLARiiON
snapshot logical unit. While the inactive snapshot LU is presented to a
host, inquiry, TUR, and read capacity commands succeed, but read and write
commands are failed. Complicating the matter is the fact that read/write
to the active paths fails with a particular sense code/asc/ascq combination
while read/write to the passive paths does not.
Edward Goggin, EMC
Christophe Varoqui [Thu, 23 Nov 2006 22:49:13 +0000 (23:49 +0100)]
[checkers] sg_read() enhancement
Retry SGIO 3 times max if we get a "Unit Attention" in sense data.
Edward Goggin, EMC
Christophe Varoqui [Thu, 23 Nov 2006 22:32:05 +0000 (23:32 +0100)]
[libchecker] move sg_read() to a new libsg.c
This function is bound to be shared among checkers.
So make it easy to do so.
Christophe Varoqui [Thu, 23 Nov 2006 21:52:35 +0000 (22:52 +0100)]
[checkers] multipath-wide shared context for checkers
At least one checker need to shared data between checkers attached to
all paths of a multipath.
This patch addresses this need by adding a "void * mpcontext" to
struct multipath, and its "void **" sibling in struct checker.
checker_init() ensures the multipath->mpcontext is attached to
*checker->mpcontext.
Checkers are in charge of allocating the memory block and attaching it
to *checker->mpcontext. the .init checker function is a natural
place for that.
Freeing the mpcontext in done in free_multipath().
Christophe Varoqui [Fri, 17 Nov 2006 21:04:04 +0000 (22:04 +0100)]
[defaults] Change of IBM DS8000 path grouping policy
Michael Loehr, IBM
Christophe Varoqui [Fri, 17 Nov 2006 20:33:30 +0000 (21:33 +0100)]
[libmultipath] braino, still get path prio for paths with PATH_DOWN
Edward Goggin, EMC
Christophe Varoqui [Wed, 15 Nov 2006 23:21:17 +0000 (00:21 +0100)]
[priority] adjust SCSI RTPG request buffer size in ALUA prioritizer
The following patch adds error and size checking to the REPORT TARGET
PORT GROUPS command issued by rtpg.c. The old code issued a buffer of
128 bytes, but never checked the return length. The new code starts
with a buffer of 128 bytes, but reallocates it if the buffer is too
small (SCSI returns the necessary length in the response data). This is
more robust as it handles devices that consume more than 128 bytes for
RTPG, like the Incipient NSP.
I tried to handle errors, etc. as closely as I could to what is already
there in the code. Let me know if you'd prefer anything written
differently.
Brian Geisel
Christophe Varoqui [Wed, 15 Nov 2006 23:06:48 +0000 (00:06 +0100)]
[libmultipath] clarify priority values
Define two values :
PRIO_UNDEF: prioritizer not exec yet, or returned an error
PRIO_DEFAULT: no prioritizer set, default value arbitrary set to 1
Changes :
1) 0 is no longer used as a possible priority value.
2) don't exec prioritizer in pathinfo() if path is down and priority is
defined
Edward Goggin, EMC
Dave Wysochanski, Red Hat
& Me
Christophe Varoqui [Tue, 14 Nov 2006 22:13:01 +0000 (23:13 +0100)]
[libcheckers] document checker states
Dave Wysochanski, Red Hat
Christophe Varoqui [Tue, 14 Nov 2006 21:26:38 +0000 (22:26 +0100)]
[libmultipath] scope limiting fixes
I messed up the patch a bit. Apparently dm_get_uuid() can
return a zero without actually having found a dm name which
matches the name parameter.
Also, I changed dm_get_uuid() so it either returns 1 or a null
string in the uuid return parameter -- in 2 different cases
it was doing neither.
The <dm_device_name> qualifier for the command line
"multipath -ll <dm device name>" can now accept up
to 3 different names for the same dm mapped device,
that is, a user friendly name, an alias in
/etc/multipath.conf, and the current name as
reported by "dmsetup ls".
Edward Goggin, EMC
Christophe Varoqui [Mon, 13 Nov 2006 22:55:20 +0000 (23:55 +0100)]
[libmultipath] configure() scope-limiting corner case
This patch enables "multipath -l <dm device name>"
to work if the current dm_alias has been changed by
"dmsetup rename" or other means.
Edward Goggin, EMC
Christophe Varoqui [Sat, 11 Nov 2006 14:04:59 +0000 (15:04 +0100)]
[libcheckers]
Change to libcheckers/readsector0.c to allow other checkers than
readsector0 to use sg_read().
Also provide the sense info in a buffer supplied by caller.
Edward Goggin, EMC
Christophe Varoqui [Sat, 11 Nov 2006 13:57:55 +0000 (14:57 +0100)]
[libmultipath] pathinfo() to invoke the path priority callout
Changed libmultipath/discovery.c to allow pathinfo() to invoke the path
priority callout function of a path with a path state of PATH_DOWN since
some paths (e.g., paths to inactive snapshot LU on CLARiiON) may have
their state set to PATH_DOWN for reasons other than transport
connectivity failure.
Without this change, it is possible to create a situation whereby there
are paths of different priorities in the same path group even though the
path group policy is priority based grouping. This is certainly the
case for paths to a multipath mapped device for an inactive snapshot
CLARiiON LUs when the paths change to a healthy state as soon as the
snapshot is activated.
Edward Goggin, EMC
Christophe Varoqui [Thu, 9 Nov 2006 21:17:13 +0000 (22:17 +0100)]
[libmultipath] remove dup_hwe()
Deprecated by recently introduced find_hwe_strmatch().
Christophe Varoqui [Thu, 9 Nov 2006 21:16:00 +0000 (22:16 +0100)]
[libmultipath] RR_WEIGHT_PRIORITIES undefined
Yet. So don't use it in the recently introduced HSV2.* defaults.
Christophe Varoqui [Thu, 9 Nov 2006 21:07:41 +0000 (22:07 +0100)]
[libmultipath] Update HP HSV200 hardware table
According to HP the behaviour of the HSV200 depends on the software
release; all revisions smaller or equal to '3000' have active/passive
support; all revisions above that have active/active support.
Translated it means that the older firmware uses the HP-style
'START_STOP_UNIT' command to switch paths, while the newer firmware
supports ALUA.
So we should update the hardware tables accordingly.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Thu, 9 Nov 2006 21:06:05 +0000 (22:06 +0100)]
[libmultipath] Add support for matching against revision field
The standard SCSI inquiry data provides for a field 'revision' which
specifies the software revision of the device. Some vendors changed
the behaviour during software releases so it's desireable that we
can match on that field in the hardware table, too.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Thu, 9 Nov 2006 21:02:46 +0000 (22:02 +0100)]
[libmultipath] Use strmatch to load config file
Currently we're using regexec to load the initial hardware table.
Unfortunately the hardware table has regex as defaults, so it's quite
possible for two different regular expressions do match.
But that's quite undesired as we just want a clean 1:1 copy here.
So we're better using a string match for comparison.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Wed, 8 Nov 2006 21:47:37 +0000 (22:47 +0100)]
[libmultipath] multipath devices are not created for the Luns having 8 paths
When setting the rr_weight to 'priorities' multipath fails to
setup a device-mapper table. This is due to a missing initialization
of the minio field, which will be multiplied by the path priority
for each path. This results in an eventual overflow of the minio
field and an invalid device mapper table.
References: 203823
Signed-off-by: Hannes Reinecke <hare@suse.de>
Christophe Varoqui [Thu, 19 Oct 2006 20:24:58 +0000 (22:24 +0200)]
[multipath] add '-h' option
Calling 'multipath -h' always added the line 'Unknown switch: (null)' in
front of the usage text since '-h' was not defined.
This patch just adds the '-h' option.
Volker Sameske, IBM
Christophe Varoqui [Tue, 26 Sep 2006 21:21:24 +0000 (23:21 +0200)]
[prio] ALUA prioritizer broken for paths with high minor
Here's a patch which I think will allow mpath_prio_alua to
work better with device files with minor numbers >= 256.
Edward Goggin, EMC
Christophe Varoqui [Mon, 4 Sep 2006 19:33:37 +0000 (21:33 +0200)]
[libmultipath] remove some more absolute path in hwtable
Hannes sent a patch to remove one for IBM 3526.
Go a bit further, removing all absolute paths.
Christophe Varoqui [Sun, 3 Sep 2006 22:33:08 +0000 (00:33 +0200)]
[multipath] disabling lock_fs call on DM_DEVICE_RESUME libdevmapper ioctl
This patch to dm_simplecmd of multipath-tools/libmultipath/devmapper.c will
disable the use of lock_fs during I/O suspension while changing
dm-multipath
device mapper maps via the DM_DEVICE_RESUME ioctl of libdevmapper.
Disabling lock_fs will result in not flushing I/O to the dm-multipath block
device before changing the maps for the mapped device. Flushing I/O at
this
time appears not only unnecessary for dm-multipath devices but causes some
troublesome delays due to SCSI HBA driver target-side timeouts when these
maps are changed as a result of paths coming and going while upgrading
software (a non-disruptive ucode upgrade) on a storage system.
As is the case for any change which is dependent on similar changes in
libdevmapper and the kernel, this patch will introduce a dependency on
libdevmapper and kernel. Not sure which versions first had this support
but
at least libdevmapper 1.02.02 and linux kernel version 2.6.18-rc2 have the
required support.
Edward Goggin, EMC
Christophe Varoqui [Sun, 3 Sep 2006 22:15:44 +0000 (00:15 +0200)]
[multipath] Fixup return code for 'multipath -l'
'multipath -l' should really set the return code to '0' if no error
occurred.
Hannes Reinecke, Suse
Christophe Varoqui [Sun, 3 Sep 2006 22:14:54 +0000 (00:14 +0200)]
[multipath] remove obsolete '-D' option
our documentation folks complained that the manpage documents an
obsolete / unused '-D' option for multipath.
This patch removes this description from the manpage.
Hannes Reinecke, Suse
Christophe Varoqui [Sun, 3 Sep 2006 22:13:54 +0000 (00:13 +0200)]
[libmultipath] Fixup hwtable regexp
appearently no-one noticed that we've switched to regular expressions
instead of shell-style fnmatch for the hwtable.
Quite surprisingly, really, that no-one complained; the change has been
done in October 2005.
Anyway, this patch cleans it up. And also splits off the IBM DS6000 and
IBM SVC, as they are separate machines.
Hannes Reinecke, Suse
Christophe Varoqui [Sun, 3 Sep 2006 22:12:53 +0000 (00:12 +0200)]
[priority] disable debug output for pp_tpc
this patch removes the debug output for pp_tpc and also decreases the
priority ratings so that the passive path will have a priority of 0.
Hannes Reinecke, Suse
Christophe Varoqui [Sun, 3 Sep 2006 22:11:39 +0000 (00:11 +0200)]
[libmultipath] add support for IBM 3526
we've found another IBM storage server in our lab; this patch adds the
necessary hwtable entry for it.
However, this is an RDAC machine, so it'll work only in some cases. One
day we really need an RDAC hw-handler.
Hannes Reinecke, Suse
Christophe Varoqui [Sat, 12 Aug 2006 14:30:31 +0000 (16:30 +0200)]
[checkers] EMC checker to report LUNZ as failing (2)
Fix braino while applying patch.
Christophe Varoqui [Fri, 11 Aug 2006 06:45:29 +0000 (08:45 +0200)]
[checkers] EMC checker to report LUNZ as failing
This patch simply reports a PATH_DOWN status for paths to an EMC CLARiiON
LUNZ (or an unbound) block device since these paths cannot possibly be used
to issue I/O to such a device. In fact, allowing block I/O to a LUNZ
dm-multipath device will cause the process to hang until the no_path_retry
timeout is incurred. This is not desirable.
Ed Goggin, EMC
Christophe Varoqui [Wed, 19 Jul 2006 12:49:34 +0000 (14:49 +0200)]
[libmultipath] make sure to terminate strftime buff properly
Bernhard Fischer
Christophe Varoqui [Wed, 19 Jul 2006 12:44:20 +0000 (14:44 +0200)]
[libmultipath] allow for non-default DESTDIR in hwtable
Bernhard Fischer
Christophe Varoqui [Wed, 19 Jul 2006 12:43:32 +0000 (14:43 +0200)]
[libmultipath] make sure that the callout program picks up the PATH from
the invoking shell
Bernhard Fischer
Christophe Varoqui [Wed, 19 Jul 2006 12:40:46 +0000 (14:40 +0200)]
[multipathd] sweets
- vector_foreach_slot takes an unsigned i
- don't use old-style initializer for setscheduler's sched_param
Bernhard Fischer
Christophe Varoqui [Wed, 19 Jul 2006 12:37:44 +0000 (14:37 +0200)]
[typo] s/controler/controller/g
Bernhard Fischer
Christophe Varoqui [Wed, 19 Jul 2006 12:36:06 +0000 (14:36 +0200)]
[libmultipath] move newline to dlog format parameter
Bernhard Fischer
Christophe Varoqui [Wed, 19 Jul 2006 12:33:40 +0000 (14:33 +0200)]
[man] update date of manpages
Bernhard Fischer
Christophe Varoqui [Wed, 5 Jul 2006 13:20:19 +0000 (15:20 +0200)]
[libmultipath] rename the Hitachi prioritizer in defaults table
Matthias Rudolph, HDS
Christophe Varoqui [Thu, 22 Jun 2006 14:27:19 +0000 (16:27 +0200)]
[libmultipath] fix 'multipath -d' behaviour
Volker Sameske noted 'multipath -d' was displaying the same info multiple
times, and listed paths which should be listed.
Fix that.
Christophe Varoqui [Thu, 22 Jun 2006 08:59:16 +0000 (10:59 +0200)]
[multipathd] get the layout right with "sho topo" CLI commands
Christophe Varoqui [Mon, 19 Jun 2006 08:57:06 +0000 (10:57 +0200)]
[libmultipath] snprint_size tweaks
Prefer 1.8T to 1824G, like "GNU df".
Make units knowledge easily expandable.
Push the logic to 'P', for petabyte, in this patch.
Christophe Varoqui [Mon, 19 Jun 2006 07:49:09 +0000 (09:49 +0200)]
[kpartx][libmultipath] make multipath and kpartx prefix the uuid
In order for other programs to figure out who owns the dm-devices that
are created by multipath and kpartx, this patch adds a prefix to the uuid
for all multipath and kpartx created devices. When multipath gets the
uuid,
the prefix is stripped back off. However other programs can use the device
mapper library or dmsetup to easily check which devices were created by
multipath or kpartx.
the multipath prefix is mpath-
the kpartx prefix is part%d- where %d is the partition number.
Ben Marzinski, Redhat
Christophe Varoqui [Fri, 16 Jun 2006 10:36:55 +0000 (12:36 +0200)]
Finish up the work on SG_IO timeout
all over the place.
Christophe Varoqui [Fri, 16 Jun 2006 10:23:07 +0000 (12:23 +0200)]
[libcheckers] workaround for rather profound path checking issue
Overloaded storage response time can be very long.
SG_IO timouts after DEF_TIMEOUT milliseconds, and checkers interprets this
as a path failure. multipathd then proactively evicts the path from the DM
multipath table in this case.
This generaly snow balls and ends up in full eviction and IO errors for end
users. Bad. This may also cause SCSI bus resets, causing disruption for all
local and external storage hardware users.
Provision a long timeout. Longer than any real-world application would cope
with.
If someone can suggest a real fix, like an evidence the ioctl timed out,
voice up. The ioctl being blocking, I'd rather lower the timeout and retry
than apply this workaround.
Christophe Varoqui [Tue, 13 Jun 2006 08:55:02 +0000 (10:55 +0200)]
[libmultipath] print dm-* sysfs device name in "show topo"
Useful info for admins.
Also fix a small bug in print_multipath() not reseting a buffer upon
iteration.
Christophe Varoqui [Sat, 10 Jun 2006 06:37:52 +0000 (08:37 +0200)]
[multipath] getopt cleanup
'q' and 'i' are never used, so don't accept them as valid options
Benjamin Marzinski, Redhat
Christophe Varoqui [Fri, 2 Jun 2006 20:02:17 +0000 (22:02 +0200)]
[libmultipath] fix hwtable brainos
Matthias Rudolph remembered me the most simple regex rules. Shame.
Christophe Varoqui [Fri, 2 Jun 2006 19:56:16 +0000 (21:56 +0200)]
[libmultipath] fix segv in load_config()
segv when a vendor or product string was not set in the
configuration file.
Note that now
device {
vendor DCG
}
means :
device {
vendor DCG
product *
}
Christophe Varoqui [Thu, 1 Jun 2006 10:00:21 +0000 (12:00 +0200)]
[libmultipath] print the multipath strings in "show topo"
Helps usability in complex SAN setups.
Christophe Varoqui [Thu, 1 Jun 2006 07:37:07 +0000 (09:37 +0200)]
[libmultipath] '\0' terminate strings from sysfs after the last char
Makes for fancier vendor/product/rev strings for example.
And generally makes sense.
Christophe Varoqui [Thu, 1 Jun 2006 07:34:16 +0000 (09:34 +0200)]
[libmultipath] hwtable maintenance
Mostly tweaks to the Hitachi products, from Matthias Rudolph.
Christophe Varoqui [Thu, 1 Jun 2006 07:21:29 +0000 (09:21 +0200)]
[libmultipath] fix select_alias weirdness
In select_alias, the code that tries to pull the alias from dm_get_name()
sets mp->alias. So even if it fails, mp->alias will never get set to
mp->wwid.
Benjamin Marzinski, Redhat
Christophe Varoqui [Wed, 31 May 2006 10:14:15 +0000 (12:14 +0200)]
[libmultipath] multipath size output in line with "df -h"
[size=XX GB] replaced with [size=XXG] for example.
Christophe Varoqui [Tue, 16 May 2006 21:28:12 +0000 (23:28 +0200)]
[libmultipath] pick up existing alias (if any) from current dm config
This small patch should allow multipath(8) and multipathd(8) to acquire its
internal alias name from the device-mapper's device-name for the device if a
multipath specific alias (user friendly one or not) has __not__ been set.
Otherwise, assuming that a multipath device has been renamed beforehand by
someone invoking "dm_setup rename", simply invoking "multipath" changes the
device-mapper's device-name for the device back to the multipath assigned
UID name.
Edward Goggin, EMC
Christophe Varoqui [Tue, 9 May 2006 21:43:27 +0000 (23:43 +0200)]
[build] provision for custom versioning
apply custom build/rpm versioning for multipath-tools
Brian Wong, Pillardata
Christophe Varoqui [Tue, 9 May 2006 21:37:19 +0000 (23:37 +0200)]
[libmultipath] add Apple Xserve defaults
I tested Apple's Xserve RAID with the multipath tools.
Here is the entry I had to make in the config file, if
one wants to add it to the dafault table:
Shyam Sundar.
Christophe Varoqui [Thu, 4 May 2006 21:34:40 +0000 (23:34 +0200)]
[priority] pp_alua correctness fix
Tom Kalus noted path_priority/pp_aula/spc.h misrepresented to spec
regarding the product string lentgh. Credits for the fix too.
Fix acked by Stefan Bader.
Christophe Varoqui [Mon, 24 Apr 2006 15:29:02 +0000 (17:29 +0200)]
[priority] add new HDS Modular prioritizer
Written by Matthias Rudolph, HDS.
Christophe Varoqui [Thu, 20 Apr 2006 08:26:18 +0000 (10:26 +0200)]
[libmultipath] push WWID_SIZE to 128
64 was too small for "scsi_id -p 0x80" in most cases.
As a consequence, the tools refuse to get the uid at all and the path was
discarded ... which is still the good behaviour.
The problem tracking was done by Tarik Sedlarevic, Visionbytes.
Christophe Varoqui [Thu, 13 Apr 2006 21:03:08 +0000 (23:03 +0200)]
[libmultipath] fix segfault when no config file
Brian Wong noticed the segfault and tracked it down to free_keywords()
trying to walk a NULL keywords vector. Credits.
Christophe Varoqui [Wed, 12 Apr 2006 19:49:39 +0000 (21:49 +0200)]
[libmultipath] get_serial overflow fix
Arsene Gschwind tracked down this bug. Credits.
The patch also normalize the return codes, even if they are not
used yet.
Christophe Varoqui [Fri, 7 Apr 2006 22:14:49 +0000 (00:14 +0200)]
[libmultipath] remove harmless duplicated code
Christophe Varoqui [Mon, 3 Apr 2006 22:09:23 +0000 (00:09 +0200)]
[libmultipath] update netapp and IBM nseries (netapp) hwtable.c
David Wysochanski, Netapp
Christophe Varoqui [Fri, 31 Mar 2006 21:51:43 +0000 (23:51 +0200)]
[multipath] cosmetical fix
I'd like to ask some cosmetical fix in libmultipath.
In Redhat /etc/rc.sysinit calls /sbin/multipath -v 0 after modprobe
dm-multipath to catch the disks already attached.
Now it prints a small garbage on screen for every map, I think.
Actually every multipath -F; multipath/multipath -v 0 sequence does
that.
The reason is neither print_multipath_topology nor
snprint_multipath_topology initialize buff if verbosity is 0.
Maxim Kozover
Christophe Varoqui [Fri, 31 Mar 2006 21:17:10 +0000 (23:17 +0200)]
[multipathd] some more output coherency
Christophe Varoqui [Fri, 31 Mar 2006 21:08:08 +0000 (23:08 +0200)]
[libmultipath] plug the keywords vector leak upon "reconfigure"
Christophe Varoqui [Fri, 31 Mar 2006 21:00:56 +0000 (23:00 +0200)]
[multipathd] plug a small leak on "reconfigure" CLI command
Christophe Varoqui [Mon, 27 Mar 2006 15:58:15 +0000 (17:58 +0200)]
[multipathd] don't set the SIGKILL signal
Valgrind told me it was useless.
Christophe Varoqui [Thu, 16 Mar 2006 08:17:49 +0000 (09:17 +0100)]
[libmultipath] compilation fix
waiter.h should be empty when libmultipath is built for multipath(8)
so preprocess its content.
Christophe Varoqui [Thu, 16 Mar 2006 08:07:02 +0000 (09:07 +0100)]
[multipathd] ignore SIGPIPE
Maxim Kozover reported daemon segfault when breaking the recieving side
of the unix socket. Credits.
Christophe Varoqui [Wed, 15 Mar 2006 10:46:32 +0000 (11:46 +0100)]
[libmultipath] NetApp maintainer change
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.