Re: [PATCH] block: print offending values when cloned rq limits are exceeded

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 24, 2019 at 5:50 AM John Pittman <jpittman@xxxxxxxxxx> wrote:
>
> 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.
>
> Signed-off-by: John Pittman <jpittman@xxxxxxxxxx>
> ---
>  block/blk-core.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 419d600e6637..af62150bb1ba 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -1199,7 +1199,9 @@ static int blk_cloned_rq_check_limits(struct request_queue *q,
>                                       struct request *rq)
>  {
>         if (blk_rq_sectors(rq) > blk_queue_get_max_sectors(q, req_op(rq))) {
> -               printk(KERN_ERR "%s: over max size limit.\n", __func__);
> +               printk(KERN_ERR "%s: over max size limit. (%u > %u)\n",
> +                       __func__, blk_rq_sectors(rq),
> +                       blk_queue_get_max_sectors(q, req_op(rq)));
>                 return -EIO;
>         }
>
> @@ -1211,7 +1213,8 @@ static int blk_cloned_rq_check_limits(struct request_queue *q,
>          */
>         blk_recalc_rq_segments(rq);
>         if (rq->nr_phys_segments > queue_max_segments(q)) {
> -               printk(KERN_ERR "%s: over max segments limit.\n", __func__);
> +               printk(KERN_ERR "%s: over max segments limit. (%hu > %hu)\n",
> +                       __func__, rq->nr_phys_segments, queue_max_segments(q));
>                 return -EIO;
>         }

Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx>

BTW, do you still see such kind of warning since v5.1? If yes, could
you share something
more?

Thanks,
Ming Lei



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux