Skip to contentSkip to conversation

blk-mq: fix racy updates of rq->errors

DISCUSSION Christoph Hellwig 1 participant 2 messages Oct 12, 2015 1 message not in the archive NVMe

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 20151006185442.GA19820@mwanda

Christoph Hellwig

author maintainer
#1 lore raw
Quoted 5 lines · Dan Carpenter
   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>
author maintainer
#2 lore raw
Quoted 5 lines · Christoph Hellwig
Quoted 4 lines · Dan Carpenter
   622                  if (req->cmd_type == REQ_TYPE_DRV_PRIV) {
   623                          if (cmd_rq->ctx == CMD_CTX_CANCELLED)
   624                                  status = -EINTR;
Quoted 7 lines
Quoted 1 line

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