Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1639275
| From | Abdul Haleem <abdhalee@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 |
| Date | 2017-05-11 12:00 +0200 |
| Message-ID | <tFT33-4G6-1@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <tERwl-4V1-3@gated-at.bofh.it> <tFf5E-3uz-25@gated-at.bofh.it> <tFuHn-6mF-1@gated-at.bofh.it> <tFwzw-7wb-25@gated-at.bofh.it> <tFE41-3Hp-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 2017-05-10 at 19:55 +0200, Christoph Hellwig wrote:
> Hi Abdul,
>
> can you test the patch below? I'll try to create a way to inject
> short WRITE SAME commands using qemu next, but I thought I'd give
> you a chance to try it as well.
No warnings with the patch. Thanks for all your support !
Reported-and-tested-by : Abdul Haleem <abdhalee@linux.vnet.ibm.com>
>
> ---
> diff --git a/block/blk-core.c b/block/blk-core.c
> index c580b0138a7f..c7068520794b 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -2644,8 +2644,6 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
> return false;
> }
>
> - WARN_ON_ONCE(req->rq_flags & RQF_SPECIAL_PAYLOAD);
> -
> req->__data_len -= total_bytes;
>
> /* update sector only for requests with clear definition of sector */
> @@ -2658,17 +2656,19 @@ bool blk_update_request(struct request *req, int error, unsigned int nr_bytes)
> req->cmd_flags |= req->bio->bi_opf & REQ_FAILFAST_MASK;
> }
>
> - /*
> - * If total number of sectors is less than the first segment
> - * size, something has gone terribly wrong.
> - */
> - if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) {
> - blk_dump_rq_flags(req, "request botched");
> - req->__data_len = blk_rq_cur_bytes(req);
> - }
> + if (!(req->rq_flags & RQF_SPECIAL_PAYLOAD)) {
> + /*
> + * If total number of sectors is less than the first segment
> + * size, something has gone terribly wrong.
> + */
> + if (blk_rq_bytes(req) < blk_rq_cur_bytes(req)) {
> + blk_dump_rq_flags(req, "request botched");
> + req->__data_len = blk_rq_cur_bytes(req);
> + }
>
> - /* recalculate the number of segments */
> - blk_recalc_rq_segments(req);
> + /* recalculate the number of segments */
> + blk_recalc_rq_segments(req);
> + }
>
> return true;
> }
>
--
Regard's
Abdul Haleem
IBM Linux Technology Centre
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [linux-next][bock] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 Jens Axboe <axboe@kernel.dk> - 2017-05-05 16:10 +0200
Re: [linux-next][bock] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 Abdul Haleem <abdhalee@linux.vnet.ibm.com> - 2017-05-08 10:20 +0200
Re: [linux-next][bock] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 Jens Axboe <axboe@kernel.dk> - 2017-05-08 16:10 +0200
Re: [linux-next][bock] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 Christoph Hellwig <hch@lst.de> - 2017-05-09 11:10 +0200
Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 Abdul Haleem <abdhalee@linux.vnet.ibm.com> - 2017-05-09 17:20 +0200
Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 Christoph Hellwig <hch@lst.de> - 2017-05-10 10:00 +0200
Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 Abdul Haleem <abdhalee@linux.vnet.ibm.com> - 2017-05-10 12:00 +0200
Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 Christoph Hellwig <hch@lst.de> - 2017-05-10 20:00 +0200
Re: [linux-next][bock] [bisected c20cfc27a] WARNING: CPU: 22 PID: 0 at block/blk-core.c:2655 .blk_update_request+0x4f8/0x500 Abdul Haleem <abdhalee@linux.vnet.ibm.com> - 2017-05-11 12:00 +0200
csiph-web