summaryrefslogtreecommitdiff
path: root/drivers/md/raid10.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-09-10 03:23:41 +0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 03:39:09 +0400
commite5dcdd80a60627371f40797426273048630dc8ca (patch)
tree1621f68394ceaa4da86d89c6da3b93fd306415fc /drivers/md/raid10.c
parent3ec67ac1a399d576d48b0736096bcce7721fe3cf (diff)
downloadlinux-e5dcdd80a60627371f40797426273048630dc8ca.tar.xz
[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/raid10.c')
-rw-r--r--drivers/md/raid10.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index 7239079203ec..5e0b333793d5 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -669,6 +669,11 @@ static int make_request(request_queue_t *q, struct bio * bio)
int i;
int chunk_sects = conf->chunk_mask + 1;
+ if (unlikely(bio_barrier(bio))) {
+ bio_endio(bio, bio->bi_size, -EOPNOTSUPP);
+ return 0;
+ }
+
/* If this request crosses a chunk boundary, we need to
* split it. This will only happen for 1 PAGE (or less) requests.
*/