[PATCH] md: Make sure QUEUE_FLAG_CLUSTER is set properly for md.
authorNeilBrown <neilb@suse.de>
Mon, 27 Mar 2006 09:18:02 +0000 (01:18 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 27 Mar 2006 16:45:00 +0000 (08:45 -0800)
This flag should be set for a virtual device iff it is set for all underlying
devices.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
block/ll_rw_blk.c
drivers/md/md.c

index 062067fa7ead0340ee3f5da91f82af80ec097e82..a2e333ad0b64056da078623a1c2ccb31b26d0789 100644 (file)
@@ -785,6 +785,8 @@ void blk_queue_stack_limits(request_queue_t *t, request_queue_t *b)
        t->max_hw_segments = min(t->max_hw_segments,b->max_hw_segments);
        t->max_segment_size = min(t->max_segment_size,b->max_segment_size);
        t->hardsect_size = max(t->hardsect_size,b->hardsect_size);
+       if (!test_bit(QUEUE_FLAG_CLUSTER, &b->queue_flags))
+               clear_bit(QUEUE_FLAG_CLUSTER, &t->queue_flags);
 }
 
 EXPORT_SYMBOL(blk_queue_stack_limits);
index bde3e96822508a2ccbadbad97dd57dac04e24a5f..3254ff1a5cc95ecb979c24258c61ef00157be4ec 100644 (file)
@@ -266,6 +266,7 @@ static mddev_t * mddev_find(dev_t unit)
                kfree(new);
                return NULL;
        }
+       set_bit(QUEUE_FLAG_CLUSTER, &new->queue->queue_flags);
 
        blk_queue_make_request(new->queue, md_fail_request);