From: Jens Axboe <axboe@kernel.dk>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/2] block: remove wrappers for request type/flags
Date: Fri, 18 Jun 2010 12:09:17 +0200 [thread overview]
Message-ID: <4C1B45CD.10006@kernel.dk> (raw)
In-Reply-To: <20100618074645.GA13358@lst.de>
> Index: linux-2.6/drivers/block/virtio_blk.c
> ===================================================================
> --- linux-2.6.orig/drivers/block/virtio_blk.c 2010-06-16 21:15:41.120004099 +0200
> +++ linux-2.6/drivers/block/virtio_blk.c 2010-06-17 13:21:18.988006543 +0200
> @@ -65,13 +65,16 @@ static void blk_done(struct virtqueue *v
> break;
> }
>
> - if (blk_pc_request(vbr->req)) {
> + switch (vbr->req->cmd_type) {
> + case REQ_TYPE_BLOCK_PC:
> vbr->req->resid_len = vbr->in_hdr.residual;
> vbr->req->sense_len = vbr->in_hdr.sense_len;
> vbr->req->errors = vbr->in_hdr.errors;
> - }
> - if (blk_special_request(vbr->req))
> + break;
> + case REQ_TYPE_SPECIAL:
> vbr->req->errors = (error != 0);
> + break;
> + }
This conversion also makes gcc unhappy, since you don't supply a default
case. A bit silly since it's the end of the processing, I'll add one
just to shut it up.
--
Jens Axboe
next prev parent reply other threads:[~2010-06-18 10:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-18 7:46 [PATCH 1/2] block: remove wrappers for request type/flags Christoph Hellwig
2010-06-18 9:36 ` Jens Axboe
2010-06-18 16:58 ` Christoph Hellwig
2010-06-18 17:35 ` Jens Axboe
2010-06-19 12:59 ` Christoph Hellwig
2010-06-18 10:04 ` Jens Axboe
2010-06-18 10:09 ` Jens Axboe [this message]
2010-06-18 10:27 ` Jens Axboe
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=4C1B45CD.10006@kernel.dk \
--to=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
/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).