linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* blk-mq: fix racy updates of rq->errors
       [not found] <20151006185442.GA19820@mwanda>
@ 2015-10-12 19:05 ` Christoph Hellwig
  2015-10-12 19:15   ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2015-10-12 19:05 UTC (permalink / raw)


On Tue, Oct 06, 2015@09:54:42PM +0300, Dan Carpenter wrote:
>    622                  if (req->cmd_type == REQ_TYPE_DRV_PRIV) {
>    623                          if (cmd_rq->ctx == CMD_CTX_CANCELLED)
>    624                                  status = -EINTR;
> 
> This looks like it's supposed to be a bitmap.

It's not - it's a value that can have either positive (nvme status codes)
or negative Linux errnos.  It really should be an int just like req->errors
was before.  I'll send a patch to Jens.

Signed-off-by: Christoph Hellwig <hch at lst.de>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* blk-mq: fix racy updates of rq->errors
  2015-10-12 19:05 ` blk-mq: fix racy updates of rq->errors Christoph Hellwig
@ 2015-10-12 19:15   ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2015-10-12 19:15 UTC (permalink / raw)


On Mon, Oct 12, 2015@09:05:22PM +0200, Christoph Hellwig wrote:
> On Tue, Oct 06, 2015@09:54:42PM +0300, Dan Carpenter wrote:
> >    622                  if (req->cmd_type == REQ_TYPE_DRV_PRIV) {
> >    623                          if (cmd_rq->ctx == CMD_CTX_CANCELLED)
> >    624                                  status = -EINTR;
> > 
> > This looks like it's supposed to be a bitmap.
> 
> It's not - it's a value that can have either positive (nvme status codes)
> or negative Linux errnos.  It really should be an int just like req->errors
> was before.  I'll send a patch to Jens.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>

And next time I'll wait with the signoff until I've tested and sent
the patch :)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-12 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20151006185442.GA19820@mwanda>
2015-10-12 19:05 ` blk-mq: fix racy updates of rq->errors Christoph Hellwig
2015-10-12 19:15   ` Christoph Hellwig

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).