From: Christoph Hellwig <hch@lst.de>
To: Guixin Liu <kanie@linux.alibaba.com>
Cc: hch@lst.de, sagi@grimberg.me, kch@nvidia.com,
d.bogdanov@yadro.com, linux-nvme@lists.infradead.org
Subject: Re: [PATCH v13 2/2] nvmet: support reservation feature
Date: Thu, 10 Oct 2024 11:30:41 +0200 [thread overview]
Message-ID: <20241010093041.GB9749@lst.de> (raw)
In-Reply-To: <20241008102114.26199-3-kanie@linux.alibaba.com>
On Tue, Oct 08, 2024 at 06:21:14PM +0800, Guixin Liu wrote:
> This patch implements the reservation feature, includes:
s/includes/including/
> 1. reservation register(register, unregister and replace).
> 2. reservation acquire(acquire, preempt, preempt and abort).
> 3. reservation release(release and clear).
> 4. reservation report.
> 5. set feature and get feature of reservation notify mask.
> 6. get log page of reservation event.
Maybe indent this bulleted list (and the other ones) by two characters
to make it more readable?
> Not supported:
> 1. persistent reservation through power loss.
>
> Test:
Tested-by:
> Use nvme-cli and fio to test all implemented sub features:
> 1. use nvme resv-register to register host a registrant or
> unregister or replace a new key.
> 2. use nvme resv-acquire to set host to the holder, and use fio
> to send read and write io in all reservation type. And also test
> preempt and "preempt and abort".
> 3. use nvme resv-report to show all registrants and reservation
> status.
> 4. use nvme resv-release to release all registrants.
> 5. use nvme get-log to get events generated by the preceding
> operations.
That's still very basic testing, but I have no really good answer
what good test suite would be.
> +static ssize_t nvmet_ns_resv_enable_store(struct config_item *item,
> + const char *page, size_t count)
The indentation used in most nvme code is two tabs for prototype
continuations, can you change to that? I.e.:
static ssize_t nvmet_ns_resv_enable_store(struct config_item *item,
const char *page, size_t count)
> +#define NVMET_PR_NOTIFI_MASK_ALL \
> + (1 << NVME_PR_NOTIFY_BIT_REG_PREEMPTED | \
> + 1 << NVME_PR_NOTIFY_BIT_RESV_RELEASED | \
> + 1 << NVME_PR_NOTIFY_BIT_RESV_PREEMPTED)
And here I'd expect a single tab indent.
Except for these nitpicks the code looks good to me:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2024-10-10 9:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 10:21 [PATCH v13 0/2] Implement the NVMe reservation feature Guixin Liu
2024-10-08 10:21 ` [PATCH v13 1/2] nvme: add reservation command's defines Guixin Liu
2024-10-10 9:27 ` Christoph Hellwig
2024-10-08 10:21 ` [PATCH v13 2/2] nvmet: support reservation feature Guixin Liu
2024-10-08 10:37 ` Dmitry Bogdanov
2024-10-10 9:30 ` Christoph Hellwig [this message]
2024-10-11 2:22 ` Guixin Liu
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=20241010093041.GB9749@lst.de \
--to=hch@lst.de \
--cc=d.bogdanov@yadro.com \
--cc=kanie@linux.alibaba.com \
--cc=kch@nvidia.com \
--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.