linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: hch@lst.de, linux-nvme@lists.infradead.org, sagi@grimberg.me
Subject: Re: [PATCH V2 4/4] nvmet: update AEN list and array at one place
Date: Thu, 16 Jan 2020 17:55:19 +0100	[thread overview]
Message-ID: <20200116165519.GA23960@lst.de> (raw)
In-Reply-To: <20200109050244.5493-5-chaitanya.kulkarni@wdc.com>

> +
> +	if (!status)
> +		return;
> +
> +	mutex_lock(&ctrl->lock);
> +	while (ctrl->nr_async_event_cmds) {
> +		req = ctrl->async_event_cmds[--ctrl->nr_async_event_cmds];
> +		mutex_unlock(&ctrl->lock);
> +		nvmet_req_complete(req, status);
> +		mutex_lock(&ctrl->lock);
> +	}
> +	mutex_unlock(&ctrl->lock);

I think this hunk doesn't belong into nvmet_async_events_process.
I'd keep it as nvmet_async_events_free(), and then call

	nvmet_async_events_process(ctrl, NVME_SC_INTERNAL | NVME_SC_DNR);
	nvmet_async_events_free(ctrl);

in nvmet_sq_destroy (which would really benefit from a local ctrl
variable now).

Otherwise this looks good.


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-01-16 17:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09  5:02 [PATCH 0/4] nvmet: misc model, ctrl-id and AEN fixes Chaitanya Kulkarni
2020-01-09  5:02 ` [PATCH V4 1/4] nvmet: make ctrl-id configurable Chaitanya Kulkarni
2020-01-16 16:37   ` Christoph Hellwig
2020-01-09  5:02 ` [PATCH V5 2/4] nvmet: make ctrl model configurable Chaitanya Kulkarni
2020-01-16 16:40   ` Christoph Hellwig
2020-01-09  5:02 ` [PATCH V2 3/4] nvmet: check sscanf value for subsys serial attr Chaitanya Kulkarni
2020-01-09  5:02 ` [PATCH V2 4/4] nvmet: update AEN list and array at one place Chaitanya Kulkarni
2020-01-16 16:55   ` Christoph Hellwig [this message]
2020-01-13 23:52 ` [PATCH 0/4] nvmet: misc model, ctrl-id and AEN fixes Chaitanya Kulkarni

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=20200116165519.GA23960@lst.de \
    --to=hch@lst.de \
    --cc=chaitanya.kulkarni@wdc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).