public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Guixin Liu <kanie@linux.alibaba.com>
Cc: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me,
	linux-nvme@lists.infradead.org
Subject: Re: [PATCH] nvme: introduce nvme_gendisk_is_ns_head helper
Date: Wed, 27 Dec 2023 09:12:31 +0100	[thread overview]
Message-ID: <20231227081231.GB21943@lst.de> (raw)
In-Reply-To: <20231227074959.4246-1-kanie@linux.alibaba.com>

> +/* Use gendisk's fops to distinguish ns_head from ns */

That's pretty obvious from the code below..

> +static inline bool nvme_gendisk_is_ns_head(struct gendisk *disk)

Except for the weird holdout del_gendisk we only use disk in names,
not gendisk.

> +{
> +	if (disk->fops == &nvme_ns_head_ops)
> +		return true;
> +	return false;

	return disk->fops == &nvme_ns_head_ops;



      reply	other threads:[~2023-12-27  8:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27  7:49 [PATCH] nvme: introduce nvme_gendisk_is_ns_head helper Guixin Liu
2023-12-27  8:12 ` Christoph Hellwig [this message]

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=20231227081231.GB21943@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=kanie@linux.alibaba.com \
    --cc=kbusch@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