Skip to contentSkip to conversation

brd: support barriers

PATCH In review Nick Piggin 2 participants 2 messages Apr 15, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 brd: support barriers

Hi Jens,
Do you have a tree I can send this though? Is this the right way to do what I want?

--

brd is always ordered (not that it matters, as it is defined not to survive when the system goes down). So tell the block layer it is ordered, which might be of help with testing filesystems.

---
 drivers/block/brd.c |    1 +
 1 file changed, 1 insertion(+)
drivers/block/brd.c +1 -0
Index: linux-2.6/drivers/block/brd.c
===================================================================
@@ -436,6 +436,7 @@ static struct brd_device *brd_alloc(int
 	if (!brd->brd_queue)
 		goto out_free_dev;
 	blk_queue_make_request(brd->brd_queue, brd_make_request);
+	blk_queue_ordered(brd->brd_queue, QUEUE_ORDERED_TAG, NULL);
 	blk_queue_max_sectors(brd->brd_queue, 1024);
 	blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY);
 
#1 lore raw
Quoted 3 lines · Nick Piggin

Hi Jens,
Do you have a tree I can send this though? Is this the right way to do what I want?

It'll let the barriers through, so I think it does what you want :-) I can put it in the block tree.

Quoted 24 lines

--

brd is always ordered (not that it matters, as it is defined not to survive when the system goes down). So tell the block layer it is ordered, which might be of help with testing filesystems.

---
 drivers/block/brd.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6/drivers/block/brd.c
===================================================================

drivers/block/brd.c +1 -0
@@ -436,6 +436,7 @@ static struct brd_device *brd_alloc(int
 	if (!brd->brd_queue)
 		goto out_free_dev;
 	blk_queue_make_request(brd->brd_queue, brd_make_request);
+	blk_queue_ordered(brd->brd_queue, QUEUE_ORDERED_TAG, NULL);
 	blk_queue_max_sectors(brd->brd_queue, 1024);
 	blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY);
 
Signature · 1 line
Jens Axboe