Skip to content

Commit

Permalink
Merge branch 'queue' into next
Browse files Browse the repository at this point in the history
  • Loading branch information
mwilck committed Aug 23, 2024
2 parents 89940b6 + 86b9692 commit 31889b3
Show file tree
Hide file tree
Showing 159 changed files with 1,087 additions and 901 deletions.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ barbie
BINDIR
blkid
bmarzins
Bsymbolic
cciss
CFLAGS
cgroups
Expand Down
52 changes: 40 additions & 12 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
# multipath-tools Release Notes

## multipath-tools 0.9.x (in preparation)
## multipath-tools 0.10.0, 2024/08

### User-Visible Changes

* Add hardware defaults for Huawei storage arrays and XSG1 vendors
* The `multipathd show daemon` command now shows `(reconfigure pending)`
if a reconfiguration has been triggered but not finished yet.

### Other major changes

* Refactored the path checker loop. Paths are now checked for each multipath
map in turn, rather than walking linearly through the list of paths. Paths
for different multipath maps will be checked at different time offsets in
the `polling_interval` time span, which distributes the load caused by
path checking more evenly over time.
* Refactored a significant part of the libmultipath / libdevmapper interface.
All functions that retrieve information about DM maps have been converted
to use just one worker function, libmp_mapinfo(). This reduces code size
while providing more flexibility and efficiency (less device-mapper ioctls).
Also, cleanup attributes are used consistently in the libdevmapper-related code.
* Made map removal more efficient by avoiding unnecessary recursion.
* Renamed public functions, variables, and macros to comply with the
glibc [policy for reserved names](https://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html).
For backward compatibility reasons, the exported functions from `libmpathcmd`
and `libmpathpersist` that start with double underscore are kept as weak
symbols. Fixes [#91](https://github.com/opensvc/multipath-tools/issues/91).

### Bug fixes

Expand All @@ -23,17 +33,35 @@
0.9.9).
* Fixed old mpathpersist bug leading to the error message "configured reservation
key doesn't match: 0x0" when `reservation_key` was configured in the
multipaths section of `multipath.conf`.
multipaths section of `multipath.conf`
(Fixes [#92](https://github.com/opensvc/multipath-tools/issues/92)).
* Fixed output of `multipath -t` and `multipath -T` for the options
`force_sync` and `retrigger_tries`.
(Fixes [#88](https://github.com/opensvc/multipath-tools/pull/88))
* Fixed adding maps by WWID in CLI (command `add map $WWID`).

### Other

* Removed hardcoded paths and make them configurable instead.
This should improve compatibility e.g. with NixOS.
* Improved handling of paths with changed WWIDs.
* Improved synchronization between kernel state and multipathd's internal
state.
* Made map removal more efficient by avoiding unnecessary recursion.
* Added hardware defaults for Huawei storage arrays and XSG1 vendors.
* Use `-fexceptions` during compilation to make sure cleanup code is executed
when threads are cancelled
* Use `weak` attribute for `get_multipath_config()` and
`put_multipath_config()` in order to enable linking with
`-Bsymbolic-non-weak-functions`
(Fixes [#86](https://github.com/opensvc/multipath-tools/pull/86)).
* Fixed CI for ARM/v7
* Remove hardcoded paths and make them configurable instead.
This should improve compatibility e.g. with NixOS.
* Fixed directio CI test for real devices, run more "real" tests in CI
* Fixed minor issues detected by coverity.
* Fixed a minor bug in the config file parser
(Fixes [#93](https://github.com/opensvc/multipath-tools/pull/93)).
* Minor documentation fixes
(Fixes [#87](https://github.com/opensvc/multipath-tools/pull/87)).

## multipath-tools 0.9.9, 2024/05

Expand Down Expand Up @@ -128,8 +156,8 @@ versions earlier than 0.9.9. See "Other major changes" below.
had been sent before.
* Error messages sent from multipathd to the command line client have been
improved. The user will now see messages like "map or partition in use" or
"device not found" instead of just "fail".
"device not found" instead of just "fail".

### Other Major Changes

* multipathd now tracks the queueing mode of maps in its internal features
Expand All @@ -144,7 +172,7 @@ versions earlier than 0.9.9. See "Other major changes" below.

* A segmentation fault in the 0.9.7 autoresize code has been fixed.
* Fixed a bug introduced in 0.9.6 that had caused map reloads being omitted
when path priorities changed.
when path priorities changed.
* Fixed compilation with gcc 14. (Fixes [#80](https://github.com/opensvc/multipath-tools/issues/80))
* Minor fixes for issues detected by coverity.
* Spelling fixes and other minor fixes.
Expand All @@ -166,7 +194,7 @@ versions earlier than 0.9.9. See "Other major changes" below.
* Added `max_retries` config option to limit SCSI retries.
* Added `auto_resize` config option to enable resizing multipath maps automatically.
* Added support for handling FPIN-Li events for FC-NVMe.

### Other Major Changes

* Rework of alias selection code:
Expand Down Expand Up @@ -219,7 +247,7 @@ and the directio checker (fixes
* Fix handling of `dev_loss_tmo` in cases where it wasn't explicitly
configured.
* Syntax fixes in udev rules (Fixes [#69](https://github.com/opensvc/multipath-tools/pull/69)).

### Other

* Adapt HITACHI/OPEN- config to work with alua and multibus.
Expand All @@ -228,7 +256,7 @@ and the directio checker (fixes
## multipath-tools 0.9.5, 2023/04

### User-Visible Changes

* Always use directio path checker for Linux TCM (LIO) targets
(Fixes [#54](https://github.com/opensvc/multipath-tools/issues/54).
* `multipath -u` now checks if path devices are already in use
Expand Down
4 changes: 2 additions & 2 deletions create-config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ all: $(TOPDIR)/config.mk

$(multipathdir)/autoconfig.h:
@echo creating $@
@echo '#ifndef _AUTOCONFIG_H' >$@
@echo '#define _AUTOCONFIG_H' >>$@
@echo '#ifndef AUTOCONFIG_H_INCLUDED' >$@
@echo '#define AUTOCONFIG_H_INCLUDED' >>$@
@for x in $(DEFINES); do echo "#define $$x" >>$@; done
@echo '#endif' >>$@

Expand Down
6 changes: 3 additions & 3 deletions kpartx/byteorder.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef BYTEORDER_H_INCLUDED
#define BYTEORDER_H_INCLUDED
#ifndef KPARTX_BYTEORDER_H_INCLUDED
#define KPARTX_BYTEORDER_H_INCLUDED

#ifdef __linux__
# include <endian.h>
Expand All @@ -26,4 +26,4 @@
# error unsupported
#endif

#endif /* BYTEORDER_H_INCLUDED */
#endif /* KPARTX_BYTEORDER_H_INCLUDED */
6 changes: 3 additions & 3 deletions kpartx/crc32.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* crc32.h
*/
#ifndef _CRC32_H
#define _CRC32_H
#ifndef CRC32_H_INCLUDED
#define CRC32_H_INCLUDED

#include <inttypes.h>
#include <stdlib.h>
Expand All @@ -16,4 +16,4 @@ extern uint32_t crc32_be(uint32_t crc, unsigned char const *p, size_t len);
#define ether_crc_le(length, data) crc32_le(~0, data, length)
#define ether_crc(length, data) crc32_be(~0, data, length)

#endif /* _CRC32_H */
#endif /* CRC32_H_INCLUDED */
6 changes: 3 additions & 3 deletions kpartx/dasd.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _DASD_H
#define _DASD_H
#ifndef DASD_H_INCLUDED
#define DASD_H_INCLUDED

typedef struct ttr
{
Expand Down Expand Up @@ -289,4 +289,4 @@ cchhb2blk (cchhb_t *ptr, struct hd_geometry *geo)
ptr->b;
}

#endif /* _DASD_H */
#endif /* DASD_H_INCLUDED */
20 changes: 10 additions & 10 deletions kpartx/devmapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
#include "devmapper.h"
#include "kpartx.h"

#define _UUID_PREFIX "part"
#define UUID_PREFIX _UUID_PREFIX "%d-"
#define _UUID_PREFIX_LEN (sizeof(_UUID_PREFIX) - 1)
#define MAX_PREFIX_LEN (_UUID_PREFIX_LEN + 4)
#define UUID_PREFIX_ "part"
#define UUID_PREFIX UUID_PREFIX_ "%d-"
#define UUID_PREFIX_LEN (sizeof(UUID_PREFIX_) - 1)
#define MAX_PREFIX_LEN (UUID_PREFIX_LEN + 4)
#define PARAMS_SIZE 1024

#ifdef LIBDM_API_COOKIE
# define __DM_API_COOKIE_UNUSED__ /* empty */
# define DM_API_COOKIE_UNUSED__ /* empty */
#else
# define __DM_API_COOKIE_UNUSED__ __attribute__((unused))
# define DM_API_COOKIE_UNUSED__ __attribute__((unused))
#endif

int dm_prereq(char * str, uint32_t x, uint32_t y, uint32_t z)
Expand Down Expand Up @@ -60,7 +60,7 @@ int dm_prereq(char * str, uint32_t x, uint32_t y, uint32_t z)
return r;
}

int dm_simplecmd(int task, const char *name, int no_flush, __DM_API_COOKIE_UNUSED__ uint16_t udev_flags)
int dm_simplecmd(int task, const char *name, int no_flush, DM_API_COOKIE_UNUSED__ uint16_t udev_flags)
{
int r = 0;
#ifdef LIBDM_API_COOKIE
Expand Down Expand Up @@ -496,12 +496,12 @@ dm_compare_uuid(const char *mapuuid, const char *partname)
if (!partuuid)
return 1;

if (!strncmp(partuuid, _UUID_PREFIX, _UUID_PREFIX_LEN)) {
char *p = partuuid + _UUID_PREFIX_LEN;
if (!strncmp(partuuid, UUID_PREFIX_, UUID_PREFIX_LEN)) {
char *p = partuuid + UUID_PREFIX_LEN;
/* skip partition number */
while (isdigit(*p))
p++;
if (p != partuuid + _UUID_PREFIX_LEN && *p == '-' &&
if (p != partuuid + UUID_PREFIX_LEN && *p == '-' &&
!strcmp(mapuuid, p + 1))
r = 0;
}
Expand Down
6 changes: 3 additions & 3 deletions kpartx/devmapper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _KPARTX_DEVMAPPER_H
#define _KPARTX_DEVMAPPER_H
#ifndef KPARTX_DEVMAPPER_H_INCLUDED
#define KPARTX_DEVMAPPER_H_INCLUDED

#ifdef DM_SUBSYSTEM_UDEV_FLAG0
#define MPATH_UDEV_RELOAD_FLAG DM_SUBSYSTEM_UDEV_FLAG0
Expand Down Expand Up @@ -36,4 +36,4 @@ int dm_find_part(const char *parent, const char *delim, int part,
char *nondm_create_uuid(dev_t devt);
int nondm_parse_uuid(const char *uuid,
unsigned int *major, unsigned int *minor);
#endif /* _KPARTX_DEVMAPPER_H */
#endif /* KPARTX_DEVMAPPER_H_INCLUDED */
2 changes: 1 addition & 1 deletion kpartx/dos.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ struct partition {
unsigned int nr_sects;
} __attribute__((packed));

#endif /* DOS_H_INCLUDED */
#endif /* DOS_H_INCLUDED */
6 changes: 3 additions & 3 deletions kpartx/efi.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef EFI_H
#define EFI_H
#ifndef EFI_H_INCLUDED
#define EFI_H_INCLUDED

/*
* Extensible Firmware Interface
Expand Down Expand Up @@ -54,4 +54,4 @@ efi_guidcmp(efi_guid_t left, efi_guid_t right)

typedef uint16_t efi_char16_t; /* UNICODE character */

#endif /* EFI_H */
#endif /* EFI_H_INCLUDED */
4 changes: 2 additions & 2 deletions kpartx/gpt.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _GPT_H
#define _GPT_H
#ifndef GPT_H_INCLUDED
#define GPT_H_INCLUDED


#include <inttypes.h>
Expand Down
6 changes: 3 additions & 3 deletions kpartx/kpartx.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef _KPARTX_H
#define _KPARTX_H
#ifndef KPARTX_H_INCLUDED
#define KPARTX_H_INCLUDED

#include <stddef.h>
#include <stdint.h>
Expand Down Expand Up @@ -70,4 +70,4 @@ four2int(unsigned char *p) {
return p[0] + (p[1]<<8) + (p[2]<<16) + (p[3]<<24);
}

#endif /* _KPARTX_H */
#endif /* KPARTX_H_INCLUDED */
3 changes: 3 additions & 0 deletions kpartx/lopart.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#ifndef LOPART_H_INCLUDED
#define LOPART_H_INCLUDED
extern int verbose;
extern int set_loop (char **, const char *, int, int *);
extern int del_loop (const char *);
extern char * find_loop_by_file (const char *);
#endif
4 changes: 2 additions & 2 deletions kpartx/mac.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef MAC_H
#define MAC_H
#ifndef MAC_H_INCLUDED
#define MAC_H_INCLUDED

#include <stdint.h>

Expand Down
3 changes: 3 additions & 0 deletions kpartx/xstrncpy.h
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#ifndef XSTRNCPY_H_INCLUDED
#define XSTRNCPY_H_INCLUDED
extern void xstrncpy(char *dest, const char *src, size_t n);
#endif
Loading

0 comments on commit 31889b3

Please sign in to comment.