Skip to contentSkip to conversation

dm: remove all 'next_ordered' work-arounds

PATCH In review Mike Snitzer 3 participants 3 messages Jul 10, 2009 – Jul 13, 2009 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm: remove all 'next_ordered' work-arounds

bio-based DM was changed to work-around the previously misplaced next_ordered check with this commit:
99360b4c18f7675b50d283301d46d755affe75fd

request-based DM does not yet support barriers but reacted to the above bio-based DM change with this commit:
5d67aa2366ccb8257d103d0b43df855605c3c086

The above changes are no longer needed given Neil Brown's recent fix to put the next_ordered check in the __make_request path:
db64f680ba4b5c56c4be59f0698000df89ff0281

This patch removes DM's bio-based vs request-based conditional setting of next_ordered. For bio-based DM the next_ordered check is no longer a concern (as that check is now in the __make_request path). For request-based DM the default of QUEUE_ORDERED_NONE is appropriate.

Cc Mikulas Patocka <[email protected]>
Cc Kiyoshi Ueda <[email protected]>
Cc Jun'ichi Nomura <[email protected]>
Cc NeilBrown <[email protected]>

---

drivers/md/dm-table.c +0 -5
index 2cba557..5d16d06 100644
@@ -830,11 +830,6 @@ unsigned dm_table_get_type(struct dm_table *t)
 	return t->type;
 }
 
-bool dm_table_bio_based(struct dm_table *t)
-{
-	return dm_table_get_type(t) == DM_TYPE_BIO_BASED;
-}
-
 bool dm_table_request_based(struct dm_table *t)
 {
 	return dm_table_get_type(t) == DM_TYPE_REQUEST_BASED;
drivers/md/dm.c +0 -10
index 9acd54a..8a311ea 100644
@@ -2203,16 +2203,6 @@ int dm_swap_table(struct mapped_device *md, struct dm_table *table)
 		goto out;
 	}
 
-	/*
-	 * It is enought that blk_queue_ordered() is called only once when
-	 * the first bio-based table is bound.
-	 *
-	 * This setting should be moved to alloc_dev() when request-based dm
-	 * supports barrier.
-	 */
-	if (!md->map && dm_table_bio_based(table))
-		blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN, NULL);
-
 	__unbind(md);
 	r = __bind(md, table, &limits);
 
drivers/md/dm.h +0 -1
index 23278ae..a7663eb 100644
@@ -61,7 +61,6 @@ int dm_table_any_congested(struct dm_table *t, int bdi_bits);
 int dm_table_any_busy_target(struct dm_table *t);
 int dm_table_set_type(struct dm_table *t);
 unsigned dm_table_get_type(struct dm_table *t);
-bool dm_table_bio_based(struct dm_table *t);
 bool dm_table_request_based(struct dm_table *t);
 int dm_table_alloc_md_mempools(struct dm_table *t);
 void dm_table_free_md_mempools(struct dm_table *t);
Acked-by on v1 1/1
#1 lore raw

Thank you for this, Mike.

Quoted 66 lines · Mike Snitzer

bio-based DM was changed to work-around the previously misplaced next_ordered check with this commit:
99360b4c18f7675b50d283301d46d755affe75fd

request-based DM does not yet support barriers but reacted to the above bio-based DM change with this commit:
5d67aa2366ccb8257d103d0b43df855605c3c086

The above changes are no longer needed given Neil Brown's recent fix to put the next_ordered check in the __make_request path:
db64f680ba4b5c56c4be59f0698000df89ff0281

This patch removes DM's bio-based vs request-based conditional setting of next_ordered. For bio-based DM the next_ordered check is no longer a concern (as that check is now in the __make_request path). For request-based DM the default of QUEUE_ORDERED_NONE is appropriate.

Cc Mikulas Patocka <[email protected]>
Cc Kiyoshi Ueda <[email protected]>
Cc Jun'ichi Nomura <[email protected]>
Cc NeilBrown <[email protected]>

---

drivers/md/dm-table.c +0 -5
index 2cba557..5d16d06 100644
@@ -830,11 +830,6 @@ unsigned dm_table_get_type(struct dm_table *t)
 	return t->type;
 }
 
-bool dm_table_bio_based(struct dm_table *t)
-{
-	return dm_table_get_type(t) == DM_TYPE_BIO_BASED;
-}
-
 bool dm_table_request_based(struct dm_table *t)
 {
 	return dm_table_get_type(t) == DM_TYPE_REQUEST_BASED;
drivers/md/dm.c +0 -10
index 9acd54a..8a311ea 100644
@@ -2203,16 +2203,6 @@ int dm_swap_table(struct mapped_device *md, struct dm_table *table)
 		goto out;
 	}
 
-	/*
-	 * It is enought that blk_queue_ordered() is called only once when
-	 * the first bio-based table is bound.
-	 *
-	 * This setting should be moved to alloc_dev() when request-based dm
-	 * supports barrier.
-	 */
-	if (!md->map && dm_table_bio_based(table))
-		blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN, NULL);
-
 	__unbind(md);
 	r = __bind(md, table, &limits);
 
drivers/md/dm.h +0 -0
index 23278ae..a7663eb 100644

drivers/md/dm.h int dm_table_any_congested(struct dm_table *t, int bdi_bits); · line 66

Quoted 7 lines
drivers/md/dm.h +0 -1
@@ -61,7 +61,6 @@ int dm_table_any_congested(struct dm_table *t, int bdi_bits);
 int dm_table_any_busy_target(struct dm_table *t);
 int dm_table_set_type(struct dm_table *t);
 unsigned dm_table_get_type(struct dm_table *t);
-bool dm_table_bio_based(struct dm_table *t);
 bool dm_table_request_based(struct dm_table *t);
 int dm_table_alloc_md_mempools(struct dm_table *t);
 void dm_table_free_md_mempools(struct dm_table *t);
maintainer
#2 lore raw
In reply to Mike Snitzer
Quoted 66 lines · Mike Snitzer

bio-based DM was changed to work-around the previously misplaced next_ordered check with this commit:
99360b4c18f7675b50d283301d46d755affe75fd

request-based DM does not yet support barriers but reacted to the above bio-based DM change with this commit:
5d67aa2366ccb8257d103d0b43df855605c3c086

The above changes are no longer needed given Neil Brown's recent fix to put the next_ordered check in the __make_request path:
db64f680ba4b5c56c4be59f0698000df89ff0281

This patch removes DM's bio-based vs request-based conditional setting of next_ordered. For bio-based DM the next_ordered check is no longer a concern (as that check is now in the __make_request path). For request-based DM the default of QUEUE_ORDERED_NONE is appropriate.

Cc Mikulas Patocka <[email protected]>
Cc Kiyoshi Ueda <[email protected]>
Cc Jun'ichi Nomura <[email protected]>
Cc NeilBrown <[email protected]>

---

drivers/md/dm-table.c +0 -5
index 2cba557..5d16d06 100644
@@ -830,11 +830,6 @@ unsigned dm_table_get_type(struct dm_table *t)
 	return t->type;
 }
 
-bool dm_table_bio_based(struct dm_table *t)
-{
-	return dm_table_get_type(t) == DM_TYPE_BIO_BASED;
-}
-
 bool dm_table_request_based(struct dm_table *t)
 {
 	return dm_table_get_type(t) == DM_TYPE_REQUEST_BASED;
drivers/md/dm.c +0 -10
index 9acd54a..8a311ea 100644
@@ -2203,16 +2203,6 @@ int dm_swap_table(struct mapped_device *md, struct dm_table *table)
 		goto out;
 	}
 
-	/*
-	 * It is enought that blk_queue_ordered() is called only once when
-	 * the first bio-based table is bound.
-	 *
-	 * This setting should be moved to alloc_dev() when request-based dm
-	 * supports barrier.
-	 */
-	if (!md->map && dm_table_bio_based(table))
-		blk_queue_ordered(md->queue, QUEUE_ORDERED_DRAIN, NULL);
-
 	__unbind(md);
 	r = __bind(md, table, &limits);
 
drivers/md/dm.h +0 -0
index 23278ae..a7663eb 100644

drivers/md/dm.h int dm_table_any_congested(struct dm_table *t, int bdi_bits); · line 66

Quoted 7 lines
drivers/md/dm.h +0 -1
@@ -61,7 +61,6 @@ int dm_table_any_congested(struct dm_table *t, int bdi_bits);
 int dm_table_any_busy_target(struct dm_table *t);
 int dm_table_set_type(struct dm_table *t);
 unsigned dm_table_get_type(struct dm_table *t);
-bool dm_table_bio_based(struct dm_table *t);
 bool dm_table_request_based(struct dm_table *t);
 int dm_table_alloc_md_mempools(struct dm_table *t);
 void dm_table_free_md_mempools(struct dm_table *t);

Ack.

Mikulas