[PATCH] md: Make sure QUEUE_FLAG_CLUSTER is set properly for md.
Changes
2 files changed · +3 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| block/ll_rw_blk.c | modified | +2 | −0 | View file |
| drivers/md/md.c | modified | +1 | −0 | View file |
block/ll_rw_blk.c
View filediff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 062067f..a2e333a 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -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);
drivers/md/md.c
View filediff --git a/drivers/md/md.c b/drivers/md/md.c
index bde3e96..3254ff1 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -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);