Commit bea27718 authored by NeilBrown's avatar NeilBrown Committed by Linus Torvalds

[PATCH] md: Change ENOTSUPP to EOPNOTSUPP

Because that is what you get if a BIO_RW_BARRIER isn't supported!
Signed-off-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e0a33270
...@@ -315,7 +315,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int ...@@ -315,7 +315,7 @@ static int raid1_end_write_request(struct bio *bio, unsigned int bytes_done, int
if (r1_bio->bios[mirror] == bio) if (r1_bio->bios[mirror] == bio)
break; break;
if (error == -ENOTSUPP && test_bit(R1BIO_Barrier, &r1_bio->state)) { if (error == -EOPNOTSUPP && test_bit(R1BIO_Barrier, &r1_bio->state)) {
set_bit(BarriersNotsupp, &conf->mirrors[mirror].rdev->flags); set_bit(BarriersNotsupp, &conf->mirrors[mirror].rdev->flags);
set_bit(R1BIO_BarrierRetry, &r1_bio->state); set_bit(R1BIO_BarrierRetry, &r1_bio->state);
r1_bio->mddev->barriers_work = 0; r1_bio->mddev->barriers_work = 0;
...@@ -1404,7 +1404,7 @@ static void raid1d(mddev_t *mddev) ...@@ -1404,7 +1404,7 @@ static void raid1d(mddev_t *mddev)
unplug = 1; unplug = 1;
} else if (test_bit(R1BIO_BarrierRetry, &r1_bio->state)) { } else if (test_bit(R1BIO_BarrierRetry, &r1_bio->state)) {
/* some requests in the r1bio were BIO_RW_BARRIER /* some requests in the r1bio were BIO_RW_BARRIER
* requests which failed with -ENOTSUPP. Hohumm.. * requests which failed with -EOPNOTSUPP. Hohumm..
* Better resubmit without the barrier. * Better resubmit without the barrier.
* We know which devices to resubmit for, because * We know which devices to resubmit for, because
* all others have had their bios[] entry cleared. * all others have had their bios[] entry cleared.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment