From: Will Drewry
Add a dm= kernel parameter.
It allows device-mapper targets to be configured at boot time for use early
in the boot process (as the root device or otherwise).
Signed-off-by: Will Drewry
Signed-off-by: Kees Cook
[rework to use dm_ioctl calls]
Signed-off-by: Enric Balletbo i
As mentioned in the discussion from the previous version of this patch, Android
and Chrome OS do not use initramfs mostly due to boot time and size liability.
A practical example as mentioned by Kees is that Chrome OS has a limited amount
of storage available for the boot image as it is covered by
From: Enric Balletbo i Serra
Add a dm_ioctl_cmd to issue the equivalent of a DM ioctl call in kernel.
Signed-off-by: Enric Balletbo i Serra
---
Changes since v9:
- https://www.redhat.com/archives/linux-lvm/2018-September/msg00016.html
- Reorganize variables
---
drivers/md/dm-ioctl.c
On Tue, Oct 30, 2018 at 10:06:44PM +0100, Martin Wilck wrote:
> A checker shouldn't set the path state to PATH_DOWN if it fails
> to obtain information about the path in the first place. Add logic
> to the checker to distinguish a failed path from an unsupported path.
>
Reviewed-by: Benjamin
On 01/11/2018 21:06, Mike Snitzer wrote:
> On Thu, Nov 01 2018 at 4:53am -0400,
> AliOS system security wrote:
>
>> The iv_offset in the mapping table of crypt target is a 64bit number
>> when iv mode is plain64 or plain64be. It will be assigned to iv_offset of
>> struct crypt_config, cc_sector
The iv_offset in the mapping table of crypt target is a 64bit number
when iv mode is plain64 or plain64be. It will be assigned to iv_offset of
struct crypt_config, cc_sector of struct convert_context and iv_sector of
struct dm_crypt_request. These structures members are defined as a sector_t.
But
On 2018/11/2 4:06, Mike Snitzer wrote:
On Thu, Nov 01 2018 at 4:53am -0400,
AliOS system security wrote:
The iv_offset in the mapping table of crypt target is a 64bit number
when iv mode is plain64 or plain64be. It will be assigned to iv_offset of
struct crypt_config, cc_sector of struct
A checker shouldn't set the path state to PATH_DOWN if it fails
to obtain information about the path in the first place. Add logic
to the checker to distinguish a failed path from an unsupported path.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers/hp_sw.c
A checker shouldn't set the path state to PATH_DOWN if it fails
to obtain information about the path in the first place. Add logic
to the checker to distinguish a failed path from an unsupported path.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers/tur.c |
The checkers code implicitly uses a sort-of OOP class/instance model,
but very clumsily. Separate the checker "class" and "instance" cleanly,
and do a few further cleanups (constifications etc) on the way.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers.c
emc_clariion is the only path checker that was using a non-constant
message ("read error" case). This isn't possible with the msgid
approach any more. Use condlog() for the dynamic log message and
simply report "read error" as checker message.
Reviewed-by: Benjamin Marzinski
Signed-off-by:
A checker shouldn't set the path state to PATH_DOWN if it fails
to obtain information about the path in the first place. Add logic
to the checker to distinguish a failed path from an unsupported path.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers/rdac.c
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers/cciss_tur.c | 13 +
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/libmultipath/checkers/cciss_tur.c
b/libmultipath/checkers/cciss_tur.c
index 1cab2015..ea843742 100644
---
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
multipathd/main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/multipathd/main.c b/multipathd/main.c
index 2f922db7..c57aa392 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1897,7 +1897,8 @@
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/configure.c | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libmultipath/configure.c b/libmultipath/configure.c
index 09c3dcf2..ed3e30f5 100644
--- a/libmultipath/configure.c
+++
After "libmultipath: set pp->checkint in store_pathinfo()",
pp-checkint should always be properly initialized, so this code
is not needed any more.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
multipathd/main.c | 14 --
1 file changed, 14 deletions(-)
diff --git
Emit a log message when force-failing exisiting paths.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/structs_vec.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libmultipath/structs_vec.c b/libmultipath/structs_vec.c
index
Commit ee01e841 had the intention to make multipathd quit if
the client socket couldn't be set up, because the unix socket
listener is vital for signal handling in multipathd.
But during startup, this condition might be lost if the main
thread doesn't wait for the unix listener to initialize.
Hi Christophe,
this series, based on top of the recently submitted
"various multipath-tools patches (v2)" and "checkers overhaul (v3)"
series, fixes a problem that I recently observed: despite
ee01e841 "multipathd: handle errors in uxlsnr as fatal", multipathd
sometimes doesn't quit when the
This is just a safety measure in case I overlooked something wrt
the checkint initialization. It could be reverted once we know the
error message isn't triggered.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/defaults.h | 1 +
libmultipath/dict.c | 14
This saves a possibly large number of cleanup push/pop calls and
slightly improves readability.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
multipathd/main.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/multipathd/main.c b/multipathd/main.c
It can happen that, before the main thread reacts on DAEMON_SHUTDOWN
and starts cancelling threads, another thread resets the state to
something else. Fix that.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
multipathd/cli_handlers.c | 9 +++--
multipathd/main.c |
Hi Christophe,
This is v5 of my "checkers overhaul" series. Changed wrt v4
are 03/22, 11/22, and 21/22. I re-post the whole series to
avoid confusion.
This series starts with a few minor fixes and then attempts
an overhaul of the checker code.
First, there's a block of patches to get rid of the
Don't rely on any variables being defined in LOG_MSG.
If message log level is low, don't bother to fetch the message.
Signed-off-by: Martin Wilck
---
multipathd/main.c | 35 ---
1 file changed, 24 insertions(+), 11 deletions(-)
diff --git a/multipathd/main.c
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers/tur.c | 54 -
1 file changed, 30 insertions(+), 24 deletions(-)
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
index a6c88eb2..22734be2 100644
---
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers/readsector0.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/libmultipath/checkers/readsector0.c
b/libmultipath/checkers/readsector0.c
index 1c2a868e..cf79e067 100644
---
We should be able to distinguish the case where a checker
determines a path to be positively down from the case where
the checker fails to obtain necessary information, e.g.
because of a configuration problem (wrong checker).
Use PATH_WILD for the latter case, as it's hardly used now.
Provide a
Open the unix socket in multipathd code and pass the fd to
uxsock_listen(). This will enable us to make the main thread
wait for successful socket initialization in a follow-up patch.
Signed-off-by: Martin Wilck
---
multipathd/main.c | 27 ++-
multipathd/uxlsnr.c | 14
scandir() users must not only free the resulting dirent* array,
but also every member. Add a cleanup function, and fix the
existing users of scandir() in libmultipath.
Add a small helper macro for casting function pointers to the
type pthread_cleanup_push() expects.
Reviewed-by: Benjamin
valgrind complained about this.
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index 873035e5..3550c3a7 100644
---
Replace the character array "message" in struct checker with
a "message ID" field.
The generic checker code defines a couple of standard message IDs
and corresponding messages. Checker-specific message IDs start
at CHECKER_FIRST_MSG. Checkers that implement specific message
IDs must provide a
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers/rdac.c | 64 +---
1 file changed, 45 insertions(+), 19 deletions(-)
diff --git a/libmultipath/checkers/rdac.c b/libmultipath/checkers/rdac.c
index 5104e4e5..266f8e10 100644
---
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers/directio.c | 27 ++-
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/libmultipath/checkers/directio.c b/libmultipath/checkers/directio.c
index a80848d4..c4a0712e 100644
Blanking a WWID is a dangerous operation. E.g. configure() would
consider the path in question as invalid and orphan it if the
WWID is blank. Don't do this checker failures which may be transient
or indicate a badly configured or otherwise malfunctioning checker.
Moreover, we try to determine WWID
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/checkers/hp_sw.c | 12
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/libmultipath/checkers/hp_sw.c b/libmultipath/checkers/hp_sw.c
index 0ad34a6b..d7f1018c 100644
---
store_pathinfo is called with valid conf pointer anyway, so
checkint is available. pp->checkint is now valid for every
path after path_discovery().
This fixes a bad conf access in cli_add_path().
Reviewed-by: Benjamin Marzinski
Signed-off-by: Martin Wilck
---
libmultipath/discovery.c | 1 +
Hello Sunao,
On Sat, 2018-10-27 at 12:40 +0800, s90006763 wrote:
> This patch solves this problem and gets the complete display of host
> WWNN related fields,as follows:multipathd show paths format "%N %n"
> Host WWNN Target WWPN
> Iqn.xx-x.com.redhat:86329
On Fri, Nov 02, 2018 at 01:23:59PM +0100, Martin Wilck wrote:
> Open the unix socket in multipathd code and pass the fd to
> uxsock_listen(). This will enable us to make the main thread
> wait for successful socket initialization in a follow-up patch.
>
Reviewed-by: Benjamin Marzinski
>
On Fri, Nov 02, 2018 at 01:21:07PM +0100, Martin Wilck wrote:
> Replace the character array "message" in struct checker with
> a "message ID" field.
>
> The generic checker code defines a couple of standard message IDs
> and corresponding messages. Checker-specific message IDs start
> at
On Fri, Nov 02 2018 at 12:31am -0400,
AliOS system security wrote:
> On 2018/11/2 4:06, Mike Snitzer wrote:
> >On Thu, Nov 01 2018 at 4:53am -0400,
> >AliOS system security wrote:
> >
> >>The iv_offset in the mapping table of crypt target is a 64bit number
> >>when iv mode is plain64 or
On Thu, 2018-11-01 at 14:53 -0500, Benjamin Marzinski wrote:
> On Tue, Oct 30, 2018 at 10:06:53PM +0100, Martin Wilck wrote:
> > Get rid of the static char buffer in checker_message()
> > introduced in the previous "replace message by msgid" patch.
>
> What you have is fine, but why not
41 matches
Mail list logo