X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=drivers%2Fblock%2Fxen-blkfront.c;h=6fd160197b7a465d647c5dfe2d0849a6b341e6ad;hb=c2df40dfb8c0;hp=52963a26660aea99d8c48142dc01facacbd16aba;hpb=d9d8c5c489f4969667a05727e9c2c4f78cffef1a;p=cascardo%2Flinux.git diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 52963a26660a..6fd160197b7a 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -844,7 +844,8 @@ static int blkif_queue_request(struct request *req, struct blkfront_ring_info *r if (unlikely(rinfo->dev_info->connected != BLKIF_STATE_CONNECTED)) return 1; - if (unlikely(req->cmd_flags & (REQ_DISCARD | REQ_SECURE))) + if (unlikely(req_op(req) == REQ_OP_DISCARD || + req->cmd_flags & REQ_SECURE)) return blkif_queue_discard_req(req, rinfo); else return blkif_queue_rw_req(req, rinfo); @@ -2054,8 +2055,9 @@ static int blkif_recover(struct blkfront_info *info) /* * Get the bios in the request so we can re-queue them. */ - if (copy[i].request->cmd_flags & - (REQ_FLUSH | REQ_FUA | REQ_DISCARD | REQ_SECURE)) { + if (copy[i].request->cmd_flags & REQ_FLUSH || + req_op(copy[i].request) == REQ_OP_DISCARD || + copy[i].request->cmd_flags & (REQ_FUA | REQ_SECURE)) { /* * Flush operations don't contain bios, so * we need to requeue the whole request