On 9/11/19 9:23 AM, Max Gurtovoy wrote: > @@ -1405,6 +1406,11 @@ bool blk_update_request(struct request *req, blk_status_t error, > if (!req->bio) > return false; > > + if (blk_integrity_rq(req) && req_op(req) == REQ_OP_READ && > + error == BLK_STS_OK) > + req->q->integrity.profile->complete_fn(req, nr_bytes); > + > + > if (unlikely(error && !blk_rq_is_passthrough(req) && > !(req->rq_flags & RQF_QUIET))) > print_req_error(req, error, __func__); > @@ -693,6 +694,10 @@ void blk_mq_start_request(struct request *rq) > */ > rq->nr_phys_segments++; > } > + > + if (blk_integrity_rq(rq) && req_op(rq) == REQ_OP_WRITE) > + rq->q->integrity.profile->prepare_fn(rq); > + > } > EXPORT_SYMBOL(blk_mq_start_request); While I like the idea of centralizing stuff like this, I'm also not happy with adding checks like this to the fast path. But I guess it's still better than stuff it in drivers. You have an extra line after both of these above hunks for some reason. Can you clean that up? And the blk-mq.c hunk, we have 'q' in that function, use that instead of rq->q. -- Jens Axboe