[PATCH v5 06/14] nvmet-fcloop: add missing fcloop_callback_host_done
Daniel Wagner
dwagner at suse.de
Thu Apr 24 04:26:08 PDT 2025
On Thu, Apr 24, 2025 at 12:13:10PM +0200, Hannes Reinecke wrote:
> > + if (!tfcp_req) {
> > /* abort has already been called */
> > - return;
> > + goto out_host_done;
> > + }
> Sure this is correct?
> If the abort has been called I would have expected that all resources
> are cleaned up by the abort, so we wouldn't need to do that here...
Yes, it is still necessary to call fcpreq->done for this particular request.
> > @@ -983,7 +984,7 @@ fcloop_fcp_abort(struct nvme_fc_local_port *localport,
> > default:
> > spin_unlock_irqrestore(&tfcp_req->reqlock, flags);
> > WARN_ON(1);
> > - return;
> > + goto out_host_done;
>
> Do we still need the WARN_ON()? We can now gracefully recover, so a
> simple log message would be sufficient here, no?
The WARN_ON is there because it catches when tfcp_req is in an wrong
state. It should be either in INI_IO_START, INI_IO_ACTIVE or
INI_IO_COMPLETED but never INI_IO_ABORT.
More information about the Linux-nvme
mailing list