From e5dcdd80a60627371f40797426273048630dc8ca Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 9 Sep 2005 16:23:41 -0700 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/raid1.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/md/raid1.c') diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 51d9645..ace41c5 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -555,6 +555,10 @@ static int make_request(request_queue_t *q, struct bio * bio) unsigned long flags; struct bio_list bl; + if (unlikely(bio_barrier(bio))) { + bio_endio(bio, bio->bi_size, -EOPNOTSUPP); + return 0; + } /* * Register the new request and wait if the reconstruction -- cgit v1.1