Skip to contentSkip to conversation

cfq-iosched: do cleanup

PATCH In review Shaohua Li 2 participants 2 messages Nov 8, 2010 Block layer

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/3 cfq-iosched: do cleanup

some random fixes for cfq-iosched. My last post seems lost, so repost them.

Thanks,
Shaohua

Some functions should return boolean.

---
 block/cfq-iosched.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
block/cfq-iosched.c +8 -8
Index: linux/block/cfq-iosched.c
===================================================================
@@ -646,11 +646,11 @@ cfq_set_prio_slice(struct cfq_data *cfqd
 static inline bool cfq_slice_used(struct cfq_queue *cfqq)
 {
 	if (cfq_cfqq_slice_new(cfqq))
-		return 0;
+		return false;
 	if (time_before(jiffies, cfqq->slice_end))
-		return 0;
+		return false;
 
-	return 1;
+	return true;
 }
 
 /*
@@ -1901,10 +1901,10 @@ static bool cfq_should_idle(struct cfq_d
 	 * in their service tree.
 	 */
 	if (service_tree->count == 1 && cfq_cfqq_sync(cfqq))
-		return 1;
+		return true;
 	cfq_log_cfqq(cfqd, cfqq, "Not idling. st->count:%d",
 			service_tree->count);
-	return 0;
+	return false;
 }
 
 static void cfq_arm_slice_timer(struct cfq_data *cfqd)
@@ -2367,12 +2367,12 @@ static inline bool cfq_slice_used_soon(s
 {
 	/* the queue hasn't finished any request, can't estimate */
 	if (cfq_cfqq_slice_new(cfqq))
-		return 1;
+		return true;
 	if (time_after(jiffies + cfqd->cfq_slice_idle * cfqq->dispatched,
 		cfqq->slice_end))
-		return 1;
+		return true;
 
-	return 0;
+	return false;
 }
 
 static bool cfq_may_dispatch(struct cfq_data *cfqd, struct cfq_queue *cfqq)
#1 lore raw
Quoted 2 lines · Shaohua Li

some random fixes for cfq-iosched. My last post seems lost, so repost them.

Thanks, I will queue this up for 2.6.38.

Signature · 1 line
Jens Axboe