Commit 2c7d46ec authored by NeilBrown's avatar NeilBrown

md raid-1/10 Fix bio_rw bit manipulations again

commit 7b6d91da changed the behaviour
of a few variables in raid1 and raid10 from flags to bit-sets, but
left them as type 'bool' so they did not work.

Change them (back) to unsigned long.
(historical note: see 1ef04fef)
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Reported-by: Jiri Slaby <jslaby@suse.cz> and many others
parent 6b965620
...@@ -787,8 +787,8 @@ static int make_request(mddev_t *mddev, struct bio * bio) ...@@ -787,8 +787,8 @@ static int make_request(mddev_t *mddev, struct bio * bio)
struct bio_list bl; struct bio_list bl;
struct page **behind_pages = NULL; struct page **behind_pages = NULL;
const int rw = bio_data_dir(bio); const int rw = bio_data_dir(bio);
const bool do_sync = (bio->bi_rw & REQ_SYNC); const unsigned long do_sync = (bio->bi_rw & REQ_SYNC);
bool do_barriers; unsigned long do_barriers;
mdk_rdev_t *blocked_rdev; mdk_rdev_t *blocked_rdev;
/* /*
...@@ -1643,7 +1643,7 @@ static void raid1d(mddev_t *mddev) ...@@ -1643,7 +1643,7 @@ static void raid1d(mddev_t *mddev)
* We already have a nr_pending reference on these rdevs. * We already have a nr_pending reference on these rdevs.
*/ */
int i; int i;
const bool do_sync = (r1_bio->master_bio->bi_rw & REQ_SYNC); const unsigned long do_sync = (r1_bio->master_bio->bi_rw & REQ_SYNC);
clear_bit(R1BIO_BarrierRetry, &r1_bio->state); clear_bit(R1BIO_BarrierRetry, &r1_bio->state);
clear_bit(R1BIO_Barrier, &r1_bio->state); clear_bit(R1BIO_Barrier, &r1_bio->state);
for (i=0; i < conf->raid_disks; i++) for (i=0; i < conf->raid_disks; i++)
...@@ -1699,7 +1699,7 @@ static void raid1d(mddev_t *mddev) ...@@ -1699,7 +1699,7 @@ static void raid1d(mddev_t *mddev)
(unsigned long long)r1_bio->sector); (unsigned long long)r1_bio->sector);
raid_end_bio_io(r1_bio); raid_end_bio_io(r1_bio);
} else { } else {
const bool do_sync = r1_bio->master_bio->bi_rw & REQ_SYNC; const unsigned long do_sync = r1_bio->master_bio->bi_rw & REQ_SYNC;
r1_bio->bios[r1_bio->read_disk] = r1_bio->bios[r1_bio->read_disk] =
mddev->ro ? IO_BLOCKED : NULL; mddev->ro ? IO_BLOCKED : NULL;
r1_bio->read_disk = disk; r1_bio->read_disk = disk;
......
...@@ -799,7 +799,7 @@ static int make_request(mddev_t *mddev, struct bio * bio) ...@@ -799,7 +799,7 @@ static int make_request(mddev_t *mddev, struct bio * bio)
int i; int i;
int chunk_sects = conf->chunk_mask + 1; int chunk_sects = conf->chunk_mask + 1;
const int rw = bio_data_dir(bio); const int rw = bio_data_dir(bio);
const bool do_sync = (bio->bi_rw & REQ_SYNC); const unsigned long do_sync = (bio->bi_rw & REQ_SYNC);
struct bio_list bl; struct bio_list bl;
unsigned long flags; unsigned long flags;
mdk_rdev_t *blocked_rdev; mdk_rdev_t *blocked_rdev;
...@@ -1737,7 +1737,7 @@ static void raid10d(mddev_t *mddev) ...@@ -1737,7 +1737,7 @@ static void raid10d(mddev_t *mddev)
raid_end_bio_io(r10_bio); raid_end_bio_io(r10_bio);
bio_put(bio); bio_put(bio);
} else { } else {
const bool do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC); const unsigned long do_sync = (r10_bio->master_bio->bi_rw & REQ_SYNC);
bio_put(bio); bio_put(bio);
rdev = conf->mirrors[mirror].rdev; rdev = conf->mirrors[mirror].rdev;
if (printk_ratelimit()) if (printk_ratelimit())
......
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