aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-10-16 05:05:02 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-10-16 05:05:02 -0400
commitfd5d806266935179deda1502101624832eacd01f (patch)
treeb0d01c2ed7d754f2a6daef6c77d108a81d8a470e /drivers/md/raid5.c
parentbf2de6f5a4faf0197268f18d08969b003b87b6e8 (diff)
block: convert blkdev_issue_flush() to use empty barriers
Then we can get rid of ->issue_flush_fn() and all the driver private implementations of that. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index caaca9e178bc..8ee181a01f52 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3204,36 +3204,6 @@ static void raid5_unplug_device(struct request_queue *q)
3204 unplug_slaves(mddev); 3204 unplug_slaves(mddev);
3205} 3205}
3206 3206
3207static int raid5_issue_flush(struct request_queue *q, struct gendisk *disk,
3208 sector_t *error_sector)
3209{
3210 mddev_t *mddev = q->queuedata;
3211 raid5_conf_t *conf = mddev_to_conf(mddev);
3212 int i, ret = 0;
3213
3214 rcu_read_lock();
3215 for (i=0; i<mddev->raid_disks && ret == 0; i++) {
3216 mdk_rdev_t *rdev = rcu_dereference(conf->disks[i].rdev);
3217 if (rdev && !test_bit(Faulty, &rdev->flags)) {
3218 struct block_device *bdev = rdev->bdev;
3219 struct request_queue *r_queue = bdev_get_queue(bdev);
3220
3221 if (!r_queue->issue_flush_fn)
3222 ret = -EOPNOTSUPP;
3223 else {
3224 atomic_inc(&rdev->nr_pending);
3225 rcu_read_unlock();
3226 ret = r_queue->issue_flush_fn(r_queue, bdev->bd_disk,
3227 error_sector);
3228 rdev_dec_pending(rdev, mddev);
3229 rcu_read_lock();
3230 }
3231 }
3232 }
3233 rcu_read_unlock();
3234 return ret;
3235}
3236
3237static int raid5_congested(void *data, int bits) 3207static int raid5_congested(void *data, int bits)
3238{ 3208{
3239 mddev_t *mddev = data; 3209 mddev_t *mddev = data;
@@ -4263,7 +4233,6 @@ static int run(mddev_t *mddev)
4263 mdname(mddev)); 4233 mdname(mddev));
4264 4234
4265 mddev->queue->unplug_fn = raid5_unplug_device; 4235 mddev->queue->unplug_fn = raid5_unplug_device;
4266 mddev->queue->issue_flush_fn = raid5_issue_flush;
4267 mddev->queue->backing_dev_info.congested_data = mddev; 4236 mddev->queue->backing_dev_info.congested_data = mddev;
4268 mddev->queue->backing_dev_info.congested_fn = raid5_congested; 4237 mddev->queue->backing_dev_info.congested_fn = raid5_congested;
4269 4238