All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Use dev_open in validate geometry container
@ 2021-06-15 14:45 Blazej Kucman
  2021-07-16 14:23 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Blazej Kucman @ 2021-06-15 14:45 UTC (permalink / raw)
  To: linux-raid; +Cc: jes

Fix regression caused by the patch 1f5d54a06
("Manage: Call validate_geometry when adding drive to external container")
- mdmonitor passes to Manage() routine dev name as min:mjr.
The open() used in validate_geometry_container()
in both ddf and imsm requires path, replace open calls by dev_open,
which allows to use dev path and min:mjr.

Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
---
 super-ddf.c   | 2 +-
 super-intel.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/super-ddf.c b/super-ddf.c
index 80a40f84..dc8e512f 100644
--- a/super-ddf.c
+++ b/super-ddf.c
@@ -3463,7 +3463,7 @@ validate_geometry_ddf_container(struct supertype *st,
 	if (!dev)
 		return 1;
 
-	fd = open(dev, O_RDONLY|O_EXCL, 0);
+	fd = dev_open(dev, O_RDONLY|O_EXCL);
 	if (fd < 0) {
 		if (verbose)
 			pr_err("ddf: Cannot open %s: %s\n",
diff --git a/super-intel.c b/super-intel.c
index fe45d933..5356ca51 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -6668,7 +6668,7 @@ static int validate_geometry_imsm_container(struct supertype *st, int level,
 	if (!dev)
 		return 1;
 
-	fd = open(dev, O_RDONLY|O_EXCL, 0);
+	fd = dev_open(dev, O_RDONLY|O_EXCL);
 	if (fd < 0) {
 		if (verbose > 0)
 			pr_err("imsm: Cannot open %s: %s\n",
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Use dev_open in validate geometry container
  2021-06-15 14:45 [PATCH] Use dev_open in validate geometry container Blazej Kucman
@ 2021-07-16 14:23 ` Jes Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2021-07-16 14:23 UTC (permalink / raw)
  To: Blazej Kucman, linux-raid

On 6/15/21 10:45 AM, Blazej Kucman wrote:
> Fix regression caused by the patch 1f5d54a06
> ("Manage: Call validate_geometry when adding drive to external container")
> - mdmonitor passes to Manage() routine dev name as min:mjr.
> The open() used in validate_geometry_container()
> in both ddf and imsm requires path, replace open calls by dev_open,
> which allows to use dev path and min:mjr.
> 
> Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
> ---
>  super-ddf.c   | 2 +-
>  super-intel.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied!

Thanks,
Jes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-16 14:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-15 14:45 [PATCH] Use dev_open in validate geometry container Blazej Kucman
2021-07-16 14:23 ` Jes Sorensen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.