Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@linux.dev>
To: Christoph Hellwig <hch@lst.de>
Cc: John Garry <john.g.garry@oracle.com>,
	axboe@kernel.dk, kbusch@kernel.org, sagi@grimberg.me,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH RFC v2 1/2] block: scan partitions for hidden disks
Date: Wed, 19 Aug 2026 10:43:48 +0100	[thread overview]
Message-ID: <188916f8-45e2-434c-a466-376854c7fa4c@linux.dev> (raw)
In-Reply-To: <20260819091350.GA10298@lst.de>

On 8/19/26 10:13, Christoph Hellwig wrote:
> On Wed, Aug 19, 2026 at 10:12:50AM +0100, John Garry wrote:
>>> It also is used for giving a handle to NVMe devices that we can't support
>>> as block devices and for which we only want a handle to issue passthrough
>>> commands.  For those attempting a partition scan is rather suboptimal.
>>
>> We could set GENHD_FL_NO_PART in that case (as well as the hidden flag).
> 
> I guess we could do that.  It still feels wrong, though :

Maybe we just don't change the GENHD_FL_HIDDEN behavior. As long as 
/proc/diskstats and /proc/partitions don't show those per-path partitions.

It seems to me that we need to have a dedicated function to clone the 
partitions, and it would be called per NS after nvme_mpath_set_live() -> 
device_add_disk(). I am not sure if that works, though. We may get 
nvme_ns_head_submit_bio() looking up the per-path partition before they 
are available. In that case I would need to keep the path disabled until 
after the partition table is available.

> 
>>> As is in general doing an extra scan per controller when we know it must
>>> give the same results.  Wouldn't it make more sense to just propagate
>>> the partition table from the ns_head to each individual path?
>>
>> So you mean that we would have something which can clone the head gendisk
>> partitions onto the per-path gendisk by itering  >part_tbl and calling
>> something like blk_add_partition(), right?
> 
> Yes.

ok


  reply	other threads:[~2026-08-19  9:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18 12:08 [PATCH RFC v2 0/2] fix NVMe multipath partition diskstats John Garry
2026-08-18 12:08 ` [PATCH RFC v2 1/2] block: scan partitions for hidden disks John Garry
2026-08-19  9:00   ` Christoph Hellwig
2026-08-19  9:12     ` John Garry
2026-08-19  9:13       ` Christoph Hellwig
2026-08-19  9:43         ` John Garry [this message]
2026-08-18 12:08 ` [PATCH RFC v2 2/2] nvme-multipath: fix diskstats for partitions John Garry

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=188916f8-45e2-434c-a466-376854c7fa4c@linux.dev \
    --to=john.garry@linux.dev \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=john.g.garry@oracle.com \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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