From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: "hch@lst.de" <hch@lst.de>,
"kbusch@kernel.org" <kbusch@kernel.org>,
Chaitanya Kulkarni <chaitanyak@nvidia.com>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH 1/3] nvmet: add helper to set ns->blkshift value
Date: Sun, 23 Jan 2022 23:37:48 +0000 [thread overview]
Message-ID: <226f4cf9-4e15-3909-e9b0-e1e50c8b707b@nvidia.com> (raw)
In-Reply-To: <ac69fed5-c1ff-d36c-d88d-e466de3dfcb2@grimberg.me>
Sagi,
On 1/23/22 1:18 AM, Sagi Grimberg wrote:
> External email: Use caution opening links or attachments
>
>
>> void nvmet_file_ns_disable(struct nvmet_ns *ns)
>> {
>> if (ns->file) {
>> @@ -57,17 +67,14 @@ int nvmet_file_ns_enable(struct nvmet_ns *ns)
>> return ret;
>> }
>>
>> + ret = nvmet_file_ns_set_blkshift(ns);
>> + if (ret)
>> + return ret;
>> +
>> ret = nvmet_file_ns_revalidate(ns);
>> if (ret)
>> goto err;
>>
>> - /*
>> - * i_blkbits can be greater than the universally accepted upper
>> bound,
>> - * so make sure we export a sane namespace lba_shift.
>> - */
>> - ns->blksize_shift = min_t(u8,
>> - file_inode(ns->file)->i_blkbits, 12);
>> -
>
> Any particular reason for the change in location?
So third patch in this series sets ns->bdev if file type is block
device in nvmet_file_ns_set_blkshift(). Based on ns->bdev is NULL
or not NULL that is used to determine how we calculate ns->size
in the nvmet_file_ns_revalidate(), see last patch.
Hence move blksize_shift setting before nvmet_file_ns_revalidate().
-ck
next prev parent reply other threads:[~2022-01-23 23:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-19 7:20 [PATCH 0/3] nvmet: add buffered_io support for bdev-ns Chaitanya Kulkarni
2022-01-19 7:20 ` [PATCH 1/3] nvmet: add helper to set ns->blkshift value Chaitanya Kulkarni
2022-01-23 9:18 ` Sagi Grimberg
2022-01-23 23:37 ` Chaitanya Kulkarni [this message]
2022-01-19 7:20 ` [PATCH 2/3] nvmet: add helper to open block device Chaitanya Kulkarni
2022-01-19 7:20 ` [PATCH 3/3] nvmet: allow bdev in buffered_io mode Chaitanya Kulkarni
2022-01-26 16:27 ` [PATCH 0/3] nvmet: add buffered_io support for bdev-ns Christoph Hellwig
2022-01-27 7:46 ` Chaitanya Kulkarni
2022-01-27 8:04 ` Chaitanya Kulkarni
2022-01-27 10:07 ` Christoph Hellwig
2022-01-27 10:07 ` 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=226f4cf9-4e15-3909-e9b0-e1e50c8b707b@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=hch@lst.de \
--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 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.