diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2013-06-21 11:16:29 -0500 |
---|---|---|
committer | Benjamin Marzinski <bmarzins@redhat.com> | 2013-06-21 11:16:29 -0500 |
commit | 37dccf5dea97b3c1fc1ea563894d18b7dfea3cb1 (patch) | |
tree | 6894a65a6215e66db22ee841edeb31b93f15fa8f /0041-RH-check-for-erofs.patch | |
parent | 545c4d76325b1d9cce4a2ba41b2e0f5bd8f91822 (diff) | |
download | device-mapper-multipath-37dccf5dea97b3c1fc1ea563894d18b7dfea3cb1.tar.gz device-mapper-multipath-37dccf5dea97b3c1fc1ea563894d18b7dfea3cb1.tar.xz device-mapper-multipath-37dccf5dea97b3c1fc1ea563894d18b7dfea3cb1.zip |
device-mapper-multipath-0.4.9-52
Add 0038-RHBZ-799860-netapp-config.patch
Add 0039-RH-detect-prio-fix.patch
* Don't autodetect ALUA prioritizer unless it actually can get a priority
Add 0040-RH-bindings-fix.patch
* Do a better job of trying to get the first free user_friendly_name
Add 0041-RH-check-for-erofs.patch
* Don't create/reload a device read-only unless doing it read/write fails
with EROFS
Remove 0017-RH-fix-sigusr1.patch
* fix signal handling upstream way instead
Add 0042-UP-fix-signal-handling.patch
* uxlsnr now handles all the signals sent to multipathd. This makes its
signal handling posix compliant, and harder to mess up.
Add 0043-RH-signal-waiter.patch
* ioctl isn't a pthread cancellation point. Send a signal to the waiter
thread to break out of waiting in ioctl for a dm event.
Diffstat (limited to '0041-RH-check-for-erofs.patch')
-rw-r--r-- | 0041-RH-check-for-erofs.patch | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/0041-RH-check-for-erofs.patch b/0041-RH-check-for-erofs.patch new file mode 100644 index 0000000..d29d78d --- /dev/null +++ b/0041-RH-check-for-erofs.patch @@ -0,0 +1,121 @@ +--- + libmultipath/configure.c | 7 ------ + libmultipath/devmapper.c | 53 ++++++++++++++++++++++------------------------- + libmultipath/devmapper.h | 2 - + 3 files changed, 25 insertions(+), 37 deletions(-) + +Index: multipath-tools-130222/libmultipath/configure.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/configure.c ++++ multipath-tools-130222/libmultipath/configure.c +@@ -384,24 +384,17 @@ domap (struct multipath * mpp, char * pa + + r = dm_addmap_create(mpp, params); + +- if (!r) +- r = dm_addmap_create_ro(mpp, params); +- + lock_multipath(mpp, 0); + break; + + case ACT_RELOAD: + r = dm_addmap_reload(mpp, params); +- if (!r) +- r = dm_addmap_reload_ro(mpp, params); + if (r) + r = dm_simplecmd_noflush(DM_DEVICE_RESUME, mpp->alias); + break; + + case ACT_RESIZE: + r = dm_addmap_reload(mpp, params); +- if (!r) +- r = dm_addmap_reload_ro(mpp, params); + if (r) + r = dm_simplecmd_flush(DM_DEVICE_RESUME, mpp->alias, 1); + break; +Index: multipath-tools-130222/libmultipath/devmapper.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/devmapper.c ++++ multipath-tools-130222/libmultipath/devmapper.c +@@ -298,42 +298,39 @@ dm_addmap (int task, const char *target, + return r; + } + +-static int +-_dm_addmap_create (struct multipath *mpp, char * params, int ro) { +- int r; +- r = dm_addmap(DM_DEVICE_CREATE, TGT_MPATH, mpp, params, 1, ro); +- /* +- * DM_DEVICE_CREATE is actually DM_DEV_CREATE + DM_TABLE_LOAD. +- * Failing the second part leaves an empty map. Clean it up. +- */ +- if (!r && dm_map_present(mpp->alias)) { +- condlog(3, "%s: failed to load map (a path might be in use)", +- mpp->alias); +- dm_flush_map_nosync(mpp->alias); ++extern int ++dm_addmap_create (struct multipath *mpp, char * params) { ++ int ro; ++ ++ for (ro = 0; ro <= 1; ro++) { ++ int err; ++ ++ if (dm_addmap(DM_DEVICE_CREATE, TGT_MPATH, mpp, params, 1, ro)) ++ return 1; ++ /* ++ * DM_DEVICE_CREATE is actually DM_DEV_CREATE + DM_TABLE_LOAD. ++ * Failing the second part leaves an empty map. Clean it up. ++ */ ++ err = errno; ++ if (dm_map_present(mpp->alias)) { ++ condlog(3, "%s: failed to load map (a path might be in use)", mpp->alias); ++ dm_flush_map_nosync(mpp->alias); ++ } ++ if (err != EROFS) ++ break; + } +- return r; ++ return 0; + } + + #define ADDMAP_RW 0 + #define ADDMAP_RO 1 + + extern int +-dm_addmap_create (struct multipath *mpp, char *params) { +- return _dm_addmap_create(mpp, params, ADDMAP_RW); +-} +- +-extern int +-dm_addmap_create_ro (struct multipath *mpp, char *params) { +- return _dm_addmap_create(mpp, params, ADDMAP_RO); +-} +- +-extern int + dm_addmap_reload (struct multipath *mpp, char *params) { +- return dm_addmap(DM_DEVICE_RELOAD, TGT_MPATH, mpp, params, 0, ADDMAP_RW); +-} +- +-extern int +-dm_addmap_reload_ro (struct multipath *mpp, char *params) { ++ if (dm_addmap(DM_DEVICE_RELOAD, TGT_MPATH, mpp, params, 0, ADDMAP_RW)) ++ return 1; ++ if (errno != EROFS) ++ return 0; + return dm_addmap(DM_DEVICE_RELOAD, TGT_MPATH, mpp, params, 0, ADDMAP_RO); + } + +Index: multipath-tools-130222/libmultipath/devmapper.h +=================================================================== +--- multipath-tools-130222.orig/libmultipath/devmapper.h ++++ multipath-tools-130222/libmultipath/devmapper.h +@@ -12,9 +12,7 @@ int dm_drv_version (unsigned int * versi + int dm_simplecmd_flush (int, const char *, int); + int dm_simplecmd_noflush (int, const char *); + int dm_addmap_create (struct multipath *mpp, char *params); +-int dm_addmap_create_ro (struct multipath *mpp, char *params); + int dm_addmap_reload (struct multipath *mpp, char *params); +-int dm_addmap_reload_ro (struct multipath *mpp, char *params); + int dm_map_present (const char *); + int dm_get_map(char *, unsigned long long *, char *); + int dm_get_status(char *, char *); |