On 11/8/18 9:30 AM, Bart Van Assche wrote:
> On Thu, 2018-11-08 at 09:06 -0700, Jens Axboe wrote:
>> +static bool blk_mq_check_busy(struct blk_mq_hw_ctx *hctx, struct request
>> *rq,
>> + void *priv, bool reserved)
>> +{
>> +/*
>> + * If we find a request, we know
On Thu, 2018-11-08 at 09:06 -0700, Jens Axboe wrote:
> +static bool blk_mq_check_busy(struct blk_mq_hw_ctx *hctx, struct request *rq,
> + void *priv, bool reserved)
> +{
> + /*
> + * If we find a request, we know the queue is busy. Return false
> + * to stop
Returns true if the queue currently has requests pending,
false if not.
DM can use this to replace the atomic_inc/dec they do per device
to see if a device is busy.
Reviewed-by: Mike Snitzer
Signed-off-by: Jens Axboe
---
block/blk-mq.c | 26 ++
include/linux/blk
On 11/8/18 8:54 AM, Laurence Oberman wrote:
> On Thu, 2018-11-08 at 08:42 -0700, Jens Axboe wrote:
>> +static bool blk_mq_check_busy(struct blk_mq_hw_ctx *hctx, struct
>> request *rq,
>> + void *priv, bool reserved)
>> +{
>> + bool *busy = (bool *) priv;
>> +
>> +
On Thu, 2018-11-08 at 08:42 -0700, Jens Axboe wrote:
> +static bool blk_mq_check_busy(struct blk_mq_hw_ctx *hctx, struct
> request *rq,
> + void *priv, bool reserved)
> +{
> + bool *busy = (bool *) priv;
> +
> + /*
> + * If we find a request, we know t
On Thu, Nov 08 2018 at 10:42am -0500,
Jens Axboe wrote:
> Returns true if the queue currently has requests pending,
> false if not.
>
> DM can use this to replace the atomic_inc/dec they do per device
> to see if a device is busy.
>
> Cc: Mike Snitzer
> Signed-off-by: Jens Axboe
Reviewed-by:
Returns true if the queue currently has requests pending,
false if not.
DM can use this to replace the atomic_inc/dec they do per device
to see if a device is busy.
Cc: Mike Snitzer
Signed-off-by: Jens Axboe
---
block/blk-mq.c | 22 ++
include/linux/blk-mq.h | 2 ++