aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorJohn Pittman <jpittman@redhat.com>2019-05-23 17:49:39 -0400
committerJens Axboe <axboe@kernel.dk>2019-05-31 17:12:34 -0400
commit61939b12dc24d0ac958020f261046c35a16e0c48 (patch)
treea4bfb6fffe06ac6257977112e62c038d4394d285 /block
parentcd669f88b13474b7b65396d6413be973b7074ba1 (diff)
block: print offending values when cloned rq limits are exceeded
While troubleshooting issues where cloned request limits have been exceeded, it is often beneficial to know the actual values that have been breached. Print these values, assisting in ease of identification of root cause of the breach. Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Ming Lei <ming.lei@redhat.com> Signed-off-by: John Pittman <jpittman@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index e6a273da4559..ee1b35fe8572 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1138,7 +1138,9 @@ static int blk_cloned_rq_check_limits(struct request_queue *q,
1138 struct request *rq) 1138 struct request *rq)
1139{ 1139{
1140 if (blk_rq_sectors(rq) > blk_queue_get_max_sectors(q, req_op(rq))) { 1140 if (blk_rq_sectors(rq) > blk_queue_get_max_sectors(q, req_op(rq))) {
1141 printk(KERN_ERR "%s: over max size limit.\n", __func__); 1141 printk(KERN_ERR "%s: over max size limit. (%u > %u)\n",
1142 __func__, blk_rq_sectors(rq),
1143 blk_queue_get_max_sectors(q, req_op(rq)));
1142 return -EIO; 1144 return -EIO;
1143 } 1145 }
1144 1146
@@ -1150,7 +1152,8 @@ static int blk_cloned_rq_check_limits(struct request_queue *q,
1150 */ 1152 */
1151 blk_recalc_rq_segments(rq); 1153 blk_recalc_rq_segments(rq);
1152 if (rq->nr_phys_segments > queue_max_segments(q)) { 1154 if (rq->nr_phys_segments > queue_max_segments(q)) {
1153 printk(KERN_ERR "%s: over max segments limit.\n", __func__); 1155 printk(KERN_ERR "%s: over max segments limit. (%hu > %hu)\n",
1156 __func__, rq->nr_phys_segments, queue_max_segments(q));
1154 return -EIO; 1157 return -EIO;
1155 } 1158 }
1156 1159