From: javier@javigon.com To: linux-nvme@lists.infradead.org Cc: linux-block@vger.kernel.org, hch@lst.de, kbusch@kernel.org, sagi@grimberg.me, "Javier González" <javier.gonz@samsung.com> Subject: [PATCH 3/4] nvme: rename bdev operations Date: Tue, 1 Dec 2020 13:56:09 +0100 [thread overview] Message-ID: <20201201125610.17138-4-javier.gonz@samsung.com> (raw) In-Reply-To: <20201201125610.17138-1-javier.gonz@samsung.com> From: Javier González <javier.gonz@samsung.com> Remane block device operations in preparation to add char device file operations. Signed-off-by: Javier González <javier.gonz@samsung.com> --- drivers/nvme/host/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index c23c891a8fb8..2c23ea6dc296 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2292,7 +2292,7 @@ int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len, EXPORT_SYMBOL_GPL(nvme_sec_submit); #endif /* CONFIG_BLK_SED_OPAL */ -static const struct block_device_operations nvme_fops = { +static const struct block_device_operations nvme_bdev_ops = { .owner = THIS_MODULE, .ioctl = nvme_ioctl, .compat_ioctl = nvme_compat_ioctl, @@ -3301,7 +3301,7 @@ static inline struct nvme_ns_head *dev_to_ns_head(struct device *dev) { struct gendisk *disk = dev_to_disk(dev); - if (disk->fops == &nvme_fops) + if (disk->fops == &nvme_bdev_ops) return nvme_get_ns_from_dev(dev)->head; else return disk->private_data; @@ -3410,7 +3410,7 @@ static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj, } #ifdef CONFIG_NVME_MULTIPATH if (a == &dev_attr_ana_grpid.attr || a == &dev_attr_ana_state.attr) { - if (dev_to_disk(dev)->fops != &nvme_fops) /* per-path attr */ + if (dev_to_disk(dev)->fops != &nvme_bdev_ops) /* per-path attr */ return 0; if (!nvme_ctrl_use_ana(nvme_get_ns_from_dev(dev)->ctrl)) return 0; @@ -3863,7 +3863,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid, if (!disk) goto out_unlink_ns; - disk->fops = &nvme_fops; + disk->fops = &nvme_bdev_ops; disk->private_data = ns; disk->queue = ns->queue; disk->flags = flags; -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: javier@javigon.com To: linux-nvme@lists.infradead.org Cc: linux-block@vger.kernel.org, kbusch@kernel.org, "Javier González" <javier.gonz@samsung.com>, hch@lst.de, sagi@grimberg.me Subject: [PATCH 3/4] nvme: rename bdev operations Date: Tue, 1 Dec 2020 13:56:09 +0100 [thread overview] Message-ID: <20201201125610.17138-4-javier.gonz@samsung.com> (raw) In-Reply-To: <20201201125610.17138-1-javier.gonz@samsung.com> From: Javier González <javier.gonz@samsung.com> Remane block device operations in preparation to add char device file operations. Signed-off-by: Javier González <javier.gonz@samsung.com> --- drivers/nvme/host/core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index c23c891a8fb8..2c23ea6dc296 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -2292,7 +2292,7 @@ int nvme_sec_submit(void *data, u16 spsp, u8 secp, void *buffer, size_t len, EXPORT_SYMBOL_GPL(nvme_sec_submit); #endif /* CONFIG_BLK_SED_OPAL */ -static const struct block_device_operations nvme_fops = { +static const struct block_device_operations nvme_bdev_ops = { .owner = THIS_MODULE, .ioctl = nvme_ioctl, .compat_ioctl = nvme_compat_ioctl, @@ -3301,7 +3301,7 @@ static inline struct nvme_ns_head *dev_to_ns_head(struct device *dev) { struct gendisk *disk = dev_to_disk(dev); - if (disk->fops == &nvme_fops) + if (disk->fops == &nvme_bdev_ops) return nvme_get_ns_from_dev(dev)->head; else return disk->private_data; @@ -3410,7 +3410,7 @@ static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj, } #ifdef CONFIG_NVME_MULTIPATH if (a == &dev_attr_ana_grpid.attr || a == &dev_attr_ana_state.attr) { - if (dev_to_disk(dev)->fops != &nvme_fops) /* per-path attr */ + if (dev_to_disk(dev)->fops != &nvme_bdev_ops) /* per-path attr */ return 0; if (!nvme_ctrl_use_ana(nvme_get_ns_from_dev(dev)->ctrl)) return 0; @@ -3863,7 +3863,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, unsigned nsid, if (!disk) goto out_unlink_ns; - disk->fops = &nvme_fops; + disk->fops = &nvme_bdev_ops; disk->private_data = ns; disk->queue = ns->queue; disk->flags = flags; -- 2.17.1 _______________________________________________ Linux-nvme mailing list Linux-nvme@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-12-01 12:57 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-01 12:56 [PATCH 0/4] nvme: enable per-namespace char device javier 2020-12-01 12:56 ` javier 2020-12-01 12:56 ` [PATCH 1/4] nvme: remove unnecessary return values javier 2020-12-01 12:56 ` javier 2020-12-01 14:04 ` Minwoo Im 2020-12-01 14:04 ` Minwoo Im 2020-12-01 12:56 ` [PATCH 2/4] nvme: rename controller base dev_t char device javier 2020-12-01 12:56 ` javier 2020-12-01 14:05 ` Minwoo Im 2020-12-01 14:05 ` Minwoo Im 2020-12-01 12:56 ` javier [this message] 2020-12-01 12:56 ` [PATCH 3/4] nvme: rename bdev operations javier 2020-12-01 14:06 ` Minwoo Im 2020-12-01 14:06 ` Minwoo Im 2020-12-01 12:56 ` [PATCH 4/4] nvme: enable char device per namespace javier 2020-12-01 12:56 ` javier 2020-12-01 14:03 ` Minwoo Im 2020-12-01 14:03 ` Minwoo Im 2020-12-01 18:57 ` Javier González 2020-12-01 18:57 ` Javier González 2020-12-01 19:30 ` Keith Busch 2020-12-01 19:30 ` Keith Busch 2020-12-01 19:38 ` Christoph Hellwig 2020-12-01 19:38 ` Christoph Hellwig 2020-12-01 20:44 ` Javier González 2020-12-01 20:44 ` Javier González 2020-12-07 14:06 ` Christoph Hellwig 2020-12-07 14:06 ` Christoph Hellwig 2020-12-02 3:00 ` Minwoo Im 2020-12-02 3:00 ` Minwoo Im 2020-12-01 19:35 ` [PATCH 0/4] nvme: enable per-namespace char device Christoph Hellwig 2020-12-01 19:35 ` Christoph Hellwig
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=20201201125610.17138-4-javier.gonz@samsung.com \ --to=javier@javigon.com \ --cc=hch@lst.de \ --cc=javier.gonz@samsung.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.