/* ioc_batching returns true if the ioc is a valid batching request and should be given priority access to a request.  */
static int ioc_batching(struct request_queue *q, struct io_context *ioc)
/* ioc_batching returns true if the ioc is a valid batching request and should be given priority access to a request.  */
static int ioc_batching(struct request_queue *q, struct io_context *ioc)
{
	if (!ioc)
		return 0;
	return ioc->nr_batch_requests == q->nr_batching ||
		(ioc->nr_batch_requests > 0
		&& time_before(jiffies, ioc->last_waited + BLK_BATCH_TIME));
}