Message ID | e8f4b084-be66-d5b3-5785-13b80642040f@fb.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | Mike Snitzer |
Headers | show |
On Thu, 2017-01-26 at 11:44 -0700, Jens Axboe wrote:
> I think this may be my bug - does the below help?
Hello Jens,
What tree has that patch been generated against? It does not apply
cleanly on top of Christoph's tree:
$ git checkout hch-block-pc-refactor
$ patch -p1 --dry-run -f -s < ~/Re\:_split_scsi_passthrough_fields_out_of_struct_request_V2.mbox
1 out of 3 hunks FAILED
Thanks,
Bart.
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On 01/26/2017 11:52 AM, Bart Van Assche wrote: > On Thu, 2017-01-26 at 11:44 -0700, Jens Axboe wrote: >> I think this may be my bug - does the below help? > > Hello Jens, > > What tree has that patch been generated against? It does not apply > cleanly on top of Christoph's tree: > > $ git checkout hch-block-pc-refactor > $ patch -p1 --dry-run -f -s < ~/Re\:_split_scsi_passthrough_fields_out_of_struct_request_V2.mbox > 1 out of 3 hunks FAILED It's against my for-4.11/block, which you were running under Christoph's patches. Maybe he's using an older version? In any case, should be pretty trivial for you to hand apply. Just ensure that .flags is set to 0 for the common cases, and inherit 'flags' when it is passed in.
On Thu, Jan 26, 2017 at 11:57:36AM -0700, Jens Axboe wrote: > It's against my for-4.11/block, which you were running under Christoph's > patches. Maybe he's using an older version? In any case, should be > pretty trivial for you to hand apply. Just ensure that .flags is set to > 0 for the common cases, and inherit 'flags' when it is passed in. No, the flush op cleanups you asked for last round create a conflict with your patch. They should be trivial to fix, though. -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel
On 01/26/2017 11:59 AM, hch@lst.de wrote: > On Thu, Jan 26, 2017 at 11:57:36AM -0700, Jens Axboe wrote: >> It's against my for-4.11/block, which you were running under Christoph's >> patches. Maybe he's using an older version? In any case, should be >> pretty trivial for you to hand apply. Just ensure that .flags is set to >> 0 for the common cases, and inherit 'flags' when it is passed in. > > No, the flush op cleanups you asked for last round create a conflict > with your patch. They should be trivial to fix, though. Ah, makes sense. And yes, as I said, should be trivial to hand apply the hunk that does fail.
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index d05061f27bb1..56b92db944ae 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -117,7 +117,7 @@ struct request *blk_mq_sched_get_request(struct request_queue *q, ctx = blk_mq_get_ctx(q); hctx = blk_mq_map_queue(q, ctx->cpu); - blk_mq_set_alloc_data(data, q, 0, ctx, hctx); + blk_mq_set_alloc_data(data, q, data->flags, ctx, hctx); if (e) { data->flags |= BLK_MQ_REQ_INTERNAL; diff --git a/block/blk-mq.c b/block/blk-mq.c index dcb567642db7..9e4ed04f398c 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -253,7 +253,7 @@ EXPORT_SYMBOL_GPL(__blk_mq_alloc_request); struct request *blk_mq_alloc_request(struct request_queue *q, int rw, unsigned int flags) { - struct blk_mq_alloc_data alloc_data; + struct blk_mq_alloc_data alloc_data = { .flags = flags }; struct request *rq; int ret; @@ -1382,7 +1382,7 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) { const int is_sync = op_is_sync(bio->bi_opf); const int is_flush_fua = bio->bi_opf & (REQ_PREFLUSH | REQ_FUA); - struct blk_mq_alloc_data data; + struct blk_mq_alloc_data data = { 0, }; struct request *rq; unsigned int request_count = 0, srcu_idx; struct blk_plug *plug; @@ -1504,7 +1504,7 @@ static blk_qc_t blk_sq_make_request(struct request_queue *q, struct bio *bio) const int is_flush_fua = bio->bi_opf & (REQ_PREFLUSH | REQ_FUA); struct blk_plug *plug; unsigned int request_count = 0; - struct blk_mq_alloc_data data; + struct blk_mq_alloc_data data = { 0, }; struct request *rq; blk_qc_t cookie; unsigned int wb_acct;