aboutsummaryrefslogtreecommitdiff
path: root/drivers/md/linear.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-09-09 16:23:41 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:39:09 -0700
commite5dcdd80a60627371f40797426273048630dc8ca (patch)
tree1621f68394ceaa4da86d89c6da3b93fd306415fc /drivers/md/linear.c
parent3ec67ac1a399d576d48b0736096bcce7721fe3cf (diff)
[PATCH] md: fail IO request to md that require a barrier.
md does not yet support BIO_RW_BARRIER, so be honest about it and fail (-EOPNOTSUPP) any such requests. Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/linear.c')
-rw-r--r--drivers/md/linear.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 8d740013d74..4991ba54336 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -238,6 +238,11 @@ static int linear_make_request (request_queue_t *q, struct bio *bio)
dev_info_t *tmp_dev;
sector_t block;
+ if (unlikely(bio_barrier(bio))) {
+ bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
+ return 0;
+ }
+
if (bio_data_dir(bio)==WRITE) {
disk_stat_inc(mddev->gendisk, writes);
disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bio));