aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2010-11-24 00:40:33 -0500
committerNeilBrown <neilb@suse.de>2010-11-24 00:40:33 -0500
commitbe20e6c67b6c6024c19094d3447f144d118733b0 (patch)
tree170f7a810d5947cdba7edc965676ad7d5ea8948c /drivers/md/md.c
parent8f9e0ee38f75d4740daa9e42c8af628d33d19a02 (diff)
md: Call blk_queue_flush() to establish flush/fua support
Before 2.6.37, the md layer had a mechanism for catching I/Os with the barrier flag set, and translating the barrier into barriers for all the underlying devices. With 2.6.37, I/O barriers have become plain old flushes, and the md code was updated to reflect this. However, one piece was left out -- the md layer does not tell the block layer that it supports flushes or FUA access at all, which results in md silently dropping flush requests. Since the support already seems there, just add this one piece of bookkeeping. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 7b9e229a05e2..84c46a161927 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4338,6 +4338,8 @@ static int md_alloc(dev_t dev, char *name)
4338 if (mddev->kobj.sd && 4338 if (mddev->kobj.sd &&
4339 sysfs_create_group(&mddev->kobj, &md_bitmap_group)) 4339 sysfs_create_group(&mddev->kobj, &md_bitmap_group))
4340 printk(KERN_DEBUG "pointless warning\n"); 4340 printk(KERN_DEBUG "pointless warning\n");
4341
4342 blk_queue_flush(mddev->queue, REQ_FLUSH | REQ_FUA);
4341 abort: 4343 abort:
4342 mutex_unlock(&disks_mutex); 4344 mutex_unlock(&disks_mutex);
4343 if (!error && mddev->kobj.sd) { 4345 if (!error && mddev->kobj.sd) {