mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] nvme: parse partition table when registering a block device
@ 2023-02-09 14:37 Denis Orlov
  2023-02-10  9:52 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Denis Orlov @ 2023-02-09 14:37 UTC (permalink / raw)
  To: barebox; +Cc: Denis Orlov

Otherwise, we can not access file systems located on partitioned NVME
drives.

Signed-off-by: Denis Orlov <denorl2009@gmail.com>
---
 drivers/nvme/host/core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 79a5f9325e..bf9176ce09 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 #include <common.h>
+#include <disks.h>
 
 #include "nvme.h"
 
@@ -372,6 +373,10 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid)
 		goto out_free_id;
 	}
 
+	ret = parse_partition_table(&ns->blk);
+	if (ret)
+		dev_warn(ctrl->dev, "No partition table found\n");
+
 	return;
 out_free_id:
 	kfree(id);
-- 
2.30.2




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

end of thread, other threads:[~2023-02-10  9:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 14:37 [PATCH] nvme: parse partition table when registering a block device Denis Orlov
2023-02-10  9:52 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox