mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
Revert "ANDROID: block/mq-deadline: Only use zone locking if necessary"
Prepare for applying the FROMLIST version of this patch.
This reverts commit f57c245b52.
Bug: 234829282
Change-Id: I34cc27653fc8d22f8e068f2776be285c5e2806f3
Signed-off-by: Bart Van Assche <bvanassche@google.com>
This commit is contained in:
@@ -537,8 +537,7 @@ static int blk_revalidate_zone_cb(struct blk_zone *zone, unsigned int idx,
|
|||||||
break;
|
break;
|
||||||
case BLK_ZONE_TYPE_SEQWRITE_REQ:
|
case BLK_ZONE_TYPE_SEQWRITE_REQ:
|
||||||
case BLK_ZONE_TYPE_SEQWRITE_PREF:
|
case BLK_ZONE_TYPE_SEQWRITE_PREF:
|
||||||
if (!blk_queue_pipeline_zoned_writes(q) &&
|
if (!args->seq_zones_wlock) {
|
||||||
!args->seq_zones_wlock) {
|
|
||||||
args->seq_zones_wlock =
|
args->seq_zones_wlock =
|
||||||
blk_alloc_zone_bitmap(q->node, args->nr_zones);
|
blk_alloc_zone_bitmap(q->node, args->nr_zones);
|
||||||
if (!args->seq_zones_wlock)
|
if (!args->seq_zones_wlock)
|
||||||
|
|||||||
@@ -355,8 +355,7 @@ deadline_fifo_request(struct deadline_data *dd, struct dd_per_prio *per_prio,
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
rq = rq_entry_fifo(per_prio->fifo_list[data_dir].next);
|
rq = rq_entry_fifo(per_prio->fifo_list[data_dir].next);
|
||||||
if (data_dir == DD_READ || !blk_queue_is_zoned(rq->q) ||
|
if (data_dir == DD_READ || !blk_queue_is_zoned(rq->q))
|
||||||
blk_queue_pipeline_zoned_writes(rq->q))
|
|
||||||
return rq;
|
return rq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -401,8 +400,7 @@ deadline_next_request(struct deadline_data *dd, struct dd_per_prio *per_prio,
|
|||||||
if (!rq)
|
if (!rq)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (data_dir == DD_READ || !blk_queue_is_zoned(rq->q) ||
|
if (data_dir == DD_READ || !blk_queue_is_zoned(rq->q))
|
||||||
blk_queue_pipeline_zoned_writes(rq->q))
|
|
||||||
return rq;
|
return rq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -530,9 +528,8 @@ dispatch_find_request:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For a zoned block device that requires write serialization, if we
|
* For a zoned block device, if we only have writes queued and none of
|
||||||
* only have writes queued and none of them can be dispatched, rq will
|
* them can be dispatched, rq will be NULL.
|
||||||
* be NULL.
|
|
||||||
*/
|
*/
|
||||||
if (!rq)
|
if (!rq)
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -934,8 +931,7 @@ static void dd_finish_request(struct request *rq)
|
|||||||
|
|
||||||
atomic_inc(&per_prio->stats.completed);
|
atomic_inc(&per_prio->stats.completed);
|
||||||
|
|
||||||
if (blk_queue_is_zoned(rq->q) &&
|
if (blk_queue_is_zoned(q)) {
|
||||||
!blk_queue_pipeline_zoned_writes(q)) {
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&dd->zone_lock, flags);
|
spin_lock_irqsave(&dd->zone_lock, flags);
|
||||||
|
|||||||
Reference in New Issue
Block a user