Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
/ 2006-12-11 22:50:25 -0800
\ joe_p:
>
> It appears that I also have this same problem with a gentoo 2.6.17.14 kernel
> and drbd 0.7.22
>
> Today we move the drbd meta to a single drive and drbdsetup ran in a couple
> seconds compared to the 4-5 minutes it was taking. I applied the patch
> below tried the drbd meta data on the md raid again and did not see any
> difference in behavior. Once again it took 4-5 minutes for drbdsetup to
> complete. Is there something else that is needed to be done?
the same thing in the READ path, obviously.
slightly changed patch below.
I still think that reassigning the bi_rw explicitly,
thus stripping off whatever else is in there is a bug.
--- /mnt/kernel-src/linux-2.6.19/drivers/md/raid1.c.orig 2006-12-11 10:06:17.661776243 +0100
+++ /mnt/kernel-src/linux-2.6.19/drivers/md/raid1.c 2006-12-12 11:09:55.975762364 +0100
@@ -776,6 +776,7 @@
struct page **behind_pages = NULL;
const int rw = bio_data_dir(bio);
int do_barriers;
+ int do_sync = bio_sync(bio);
/*
* Register the new request and wait if the reconstruction
@@ -835,7 +836,7 @@
read_bio->bi_sector = r1_bio->sector + mirror->rdev->data_offset;
read_bio->bi_bdev = mirror->rdev->bdev;
read_bio->bi_end_io = raid1_end_read_request;
- read_bio->bi_rw = READ;
+ read_bio->bi_rw = READ | do_sync;
read_bio->bi_private = r1_bio;
generic_make_request(read_bio);
@@ -906,7 +907,7 @@
mbio->bi_sector = r1_bio->sector + conf->mirrors[i].rdev->data_offset;
mbio->bi_bdev = conf->mirrors[i].rdev->bdev;
mbio->bi_end_io = raid1_end_write_request;
- mbio->bi_rw = WRITE | do_barriers;
+ mbio->bi_rw = WRITE | do_barriers | do_sync;
mbio->bi_private = r1_bio;
if (behind_pages) {
--
: Lars Ellenberg Tel +43-1-8178292-0 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Vivenotgasse 48, A-1120 Vienna/Europe http://www.linbit.com :
__
please use the "List-Reply" function of your email client.