mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Denis Orlov <denorl2009@gmail.com>
To: barebox@lists.infradead.org
Cc: Denis Orlov <denorl2009@gmail.com>
Subject: [PATCH] nvme: parse partition table when registering a block device
Date: Thu,  9 Feb 2023 17:37:51 +0300	[thread overview]
Message-ID: <20230209143751.854897-1-denorl2009@gmail.com> (raw)

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




             reply	other threads:[~2023-02-09 14:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09 14:37 Denis Orlov [this message]
2023-02-10  9:52 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230209143751.854897-1-denorl2009@gmail.com \
    --to=denorl2009@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox