diff for duplicates of <20100906152931.1d4a1d07@notabene> diff --git a/a/1.txt b/N1/1.txt index 0d3b957..6ba1b70 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -24,7 +24,7 @@ Sam Ravnborg <sam@ravnborg.org> wrote: > > The full code: > > > > for (rdev = rcu_dereference(conf->mirrors[new_disk].rdev); -> > r1_bio->bios[new_disk] = IO_BLOCKED || +> > r1_bio->bios[new_disk] == IO_BLOCKED || > > !rdev || !test_bit(In_sync, &rdev->flags) > > || test_bit(WriteMostly, &rdev->flags); > > rdev = rcu_dereference(conf->mirrors[++new_disk].rdev)) { @@ -33,7 +33,7 @@ Sam Ravnborg <sam@ravnborg.org> wrote: > > r1_bio->bios[new_disk] != IO_BLOCKED) > > wonly_disk = new_disk; > > -> > if (new_disk = conf->raid_disks - 1) { +> > if (new_disk == conf->raid_disks - 1) { > > new_disk = wonly_disk; > > break; > > } @@ -100,7 +100,7 @@ index ad83a4d..e29e13f 100644 - new_disk = 0; - - for (rdev = rcu_dereference(conf->mirrors[new_disk].rdev); -- r1_bio->bios[new_disk] = IO_BLOCKED || +- r1_bio->bios[new_disk] == IO_BLOCKED || - !rdev || !test_bit(In_sync, &rdev->flags) - || test_bit(WriteMostly, &rdev->flags); - rdev = rcu_dereference(conf->mirrors[++new_disk].rdev)) { @@ -109,7 +109,7 @@ index ad83a4d..e29e13f 100644 - r1_bio->bios[new_disk] != IO_BLOCKED) - wonly_disk = new_disk; - -- if (new_disk = conf->raid_disks - 1) { +- if (new_disk == conf->raid_disks - 1) { - new_disk = wonly_disk; - break; - } @@ -125,7 +125,7 @@ index ad83a4d..e29e13f 100644 - /* make sure the disk is operational */ - for (rdev = rcu_dereference(conf->mirrors[new_disk].rdev); -- r1_bio->bios[new_disk] = IO_BLOCKED || +- r1_bio->bios[new_disk] == IO_BLOCKED || - !rdev || !test_bit(In_sync, &rdev->flags) || - test_bit(WriteMostly, &rdev->flags); - rdev = rcu_dereference(conf->mirrors[new_disk].rdev)) { @@ -137,7 +137,7 @@ index ad83a4d..e29e13f 100644 - if (new_disk <= 0) - new_disk = conf->raid_disks; - new_disk--; -- if (new_disk = disk) { +- if (new_disk == disk) { - new_disk = wonly_disk; - break; + for (i = 0 ; i < conf->raid_disks ; i++) { @@ -145,7 +145,7 @@ index ad83a4d..e29e13f 100644 + if (disk >= conf->raid_disks) + disk -= conf->raid_disks; + -+ if (r1_bio->bios[disk] = IO_BLOCKED ++ if (r1_bio->bios[disk] == IO_BLOCKED + || !(rdev = rcu_dereference(conf->mirrors[disk].rdev)) + || !test_bit(In_sync, &rdev->flags)) + continue; @@ -163,13 +163,13 @@ index ad83a4d..e29e13f 100644 goto rb_out; - disk = new_disk; -- /* now disk = new_disk = starting point for search */ +- /* now disk == new_disk == starting point for search */ - /* * Don't change to another disk for sequential reads: */ @@ -491,20 +474,20 @@ static int read_balance(conf_t *conf, r1bio_t *r1_bio) - if (this_sector = conf->mirrors[new_disk].head_position) + if (this_sector == conf->mirrors[new_disk].head_position) goto rb_out; - current_distance = abs(this_sector - conf->mirrors[disk].head_position); @@ -191,10 +191,10 @@ index ad83a4d..e29e13f 100644 - - rdev = rcu_dereference(conf->mirrors[disk].rdev); - -- if (!rdev || r1_bio->bios[disk] = IO_BLOCKED || +- if (!rdev || r1_bio->bios[disk] == IO_BLOCKED || - !test_bit(In_sync, &rdev->flags) || - test_bit(WriteMostly, &rdev->flags)) -+ if (r1_bio->bios[disk] = IO_BLOCKED ++ if (r1_bio->bios[disk] == IO_BLOCKED + || !(rdev = rcu_dereference(conf->mirrors[disk].rdev)) + || !test_bit(In_sync, &rdev->flags) + || test_bit(WriteMostly, &rdev->flags)) @@ -214,3 +214,8 @@ index ad83a4d..e29e13f 100644 if (new_disk >= 0) { rdev = rcu_dereference(conf->mirrors[new_disk].rdev); if (!rdev) + +-- +To unsubscribe from this list: send the line "unsubscribe linux-raid" in +the body of a message to majordomo@vger.kernel.org +More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/a/content_digest b/N1/content_digest index 71f762b..ff8c8ff 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -4,7 +4,7 @@ "ref\020100905203908.GA3228@merkur.ravnborg.org\0" "From\0Neil Brown <neilb@suse.de>\0" "Subject\0Re: [PATCH] md: do not use ++ in rcu_dereference() argument\0" - "Date\0Mon, 06 Sep 2010 05:29:31 +0000\0" + "Date\0Mon, 6 Sep 2010 15:29:31 +1000\0" "To\0Sam Ravnborg <sam@ravnborg.org>\0" "Cc\0Kulikov Vasiliy <segooon@gmail.com>" kernel-janitors@vger.kernel.org @@ -39,7 +39,7 @@ "> > The full code:\n" "> > \n" "> > \t\tfor (rdev = rcu_dereference(conf->mirrors[new_disk].rdev);\n" - "> > \t\t r1_bio->bios[new_disk] = IO_BLOCKED ||\n" + "> > \t\t r1_bio->bios[new_disk] == IO_BLOCKED ||\n" "> > \t\t !rdev || !test_bit(In_sync, &rdev->flags)\n" "> > \t\t\t || test_bit(WriteMostly, &rdev->flags);\n" "> > \t\t rdev = rcu_dereference(conf->mirrors[++new_disk].rdev)) {\n" @@ -48,7 +48,7 @@ "> > \t\t\t\tr1_bio->bios[new_disk] != IO_BLOCKED)\n" "> > \t\t\t\twonly_disk = new_disk;\n" "> > \n" - "> > \t\t\tif (new_disk = conf->raid_disks - 1) {\n" + "> > \t\t\tif (new_disk == conf->raid_disks - 1) {\n" "> > \t\t\t\tnew_disk = wonly_disk;\n" "> > \t\t\t\tbreak;\n" "> > \t\t\t}\n" @@ -115,7 +115,7 @@ "-\t\tnew_disk = 0;\n" "-\n" "-\t\tfor (rdev = rcu_dereference(conf->mirrors[new_disk].rdev);\n" - "-\t\t r1_bio->bios[new_disk] = IO_BLOCKED ||\n" + "-\t\t r1_bio->bios[new_disk] == IO_BLOCKED ||\n" "-\t\t !rdev || !test_bit(In_sync, &rdev->flags)\n" "-\t\t\t || test_bit(WriteMostly, &rdev->flags);\n" "-\t\t rdev = rcu_dereference(conf->mirrors[++new_disk].rdev)) {\n" @@ -124,7 +124,7 @@ "-\t\t\t\tr1_bio->bios[new_disk] != IO_BLOCKED)\n" "-\t\t\t\twonly_disk = new_disk;\n" "-\n" - "-\t\t\tif (new_disk = conf->raid_disks - 1) {\n" + "-\t\t\tif (new_disk == conf->raid_disks - 1) {\n" "-\t\t\t\tnew_disk = wonly_disk;\n" "-\t\t\t\tbreak;\n" "-\t\t\t}\n" @@ -140,7 +140,7 @@ "-\n" " \t/* make sure the disk is operational */\n" "-\tfor (rdev = rcu_dereference(conf->mirrors[new_disk].rdev);\n" - "-\t r1_bio->bios[new_disk] = IO_BLOCKED ||\n" + "-\t r1_bio->bios[new_disk] == IO_BLOCKED ||\n" "-\t !rdev || !test_bit(In_sync, &rdev->flags) ||\n" "-\t\t test_bit(WriteMostly, &rdev->flags);\n" "-\t rdev = rcu_dereference(conf->mirrors[new_disk].rdev)) {\n" @@ -152,7 +152,7 @@ "-\t\tif (new_disk <= 0)\n" "-\t\t\tnew_disk = conf->raid_disks;\n" "-\t\tnew_disk--;\n" - "-\t\tif (new_disk = disk) {\n" + "-\t\tif (new_disk == disk) {\n" "-\t\t\tnew_disk = wonly_disk;\n" "-\t\t\tbreak;\n" "+\tfor (i = 0 ; i < conf->raid_disks ; i++) {\n" @@ -160,7 +160,7 @@ "+\t\tif (disk >= conf->raid_disks)\n" "+\t\t\tdisk -= conf->raid_disks;\n" "+\n" - "+\t\tif (r1_bio->bios[disk] = IO_BLOCKED\n" + "+\t\tif (r1_bio->bios[disk] == IO_BLOCKED\n" "+\t\t || !(rdev = rcu_dereference(conf->mirrors[disk].rdev))\n" "+\t\t || !test_bit(In_sync, &rdev->flags))\n" "+\t\t\tcontinue;\n" @@ -178,13 +178,13 @@ " \t\tgoto rb_out;\n" " \n" "-\tdisk = new_disk;\n" - "-\t/* now disk = new_disk = starting point for search */\n" + "-\t/* now disk == new_disk == starting point for search */\n" "-\n" " \t/*\n" " \t * Don't change to another disk for sequential reads:\n" " \t */\n" "@@ -491,20 +474,20 @@ static int read_balance(conf_t *conf, r1bio_t *r1_bio)\n" - " \tif (this_sector = conf->mirrors[new_disk].head_position)\n" + " \tif (this_sector == conf->mirrors[new_disk].head_position)\n" " \t\tgoto rb_out;\n" " \n" "-\tcurrent_distance = abs(this_sector - conf->mirrors[disk].head_position);\n" @@ -206,10 +206,10 @@ "-\n" "-\t\trdev = rcu_dereference(conf->mirrors[disk].rdev);\n" "-\n" - "-\t\tif (!rdev || r1_bio->bios[disk] = IO_BLOCKED ||\n" + "-\t\tif (!rdev || r1_bio->bios[disk] == IO_BLOCKED ||\n" "-\t\t !test_bit(In_sync, &rdev->flags) ||\n" "-\t\t test_bit(WriteMostly, &rdev->flags))\n" - "+\t\tif (r1_bio->bios[disk] = IO_BLOCKED\n" + "+\t\tif (r1_bio->bios[disk] == IO_BLOCKED\n" "+\t\t || !(rdev = rcu_dereference(conf->mirrors[disk].rdev))\n" "+\t\t || !test_bit(In_sync, &rdev->flags)\n" "+\t\t || test_bit(WriteMostly, &rdev->flags))\n" @@ -228,6 +228,11 @@ "-\n" " \tif (new_disk >= 0) {\n" " \t\trdev = rcu_dereference(conf->mirrors[new_disk].rdev);\n" - " \t\tif (!rdev)" + " \t\tif (!rdev)\n" + "\n" + "--\n" + "To unsubscribe from this list: send the line \"unsubscribe linux-raid\" in\n" + "the body of a message to majordomo@vger.kernel.org\n" + More majordomo info at http://vger.kernel.org/majordomo-info.html -a79198b2bc1b992be2a3d3804e52ad5aea930dbcd67e7d2c5144880c1159a97d +1d199e09cfe23e9d5e5773262195e5ded90d4ec7bbd8c9dfcbbeaa46a557f35b
diff --git a/a/1.txt b/N2/1.txt index 0d3b957..c675429 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -24,7 +24,7 @@ Sam Ravnborg <sam@ravnborg.org> wrote: > > The full code: > > > > for (rdev = rcu_dereference(conf->mirrors[new_disk].rdev); -> > r1_bio->bios[new_disk] = IO_BLOCKED || +> > r1_bio->bios[new_disk] == IO_BLOCKED || > > !rdev || !test_bit(In_sync, &rdev->flags) > > || test_bit(WriteMostly, &rdev->flags); > > rdev = rcu_dereference(conf->mirrors[++new_disk].rdev)) { @@ -33,7 +33,7 @@ Sam Ravnborg <sam@ravnborg.org> wrote: > > r1_bio->bios[new_disk] != IO_BLOCKED) > > wonly_disk = new_disk; > > -> > if (new_disk = conf->raid_disks - 1) { +> > if (new_disk == conf->raid_disks - 1) { > > new_disk = wonly_disk; > > break; > > } @@ -100,7 +100,7 @@ index ad83a4d..e29e13f 100644 - new_disk = 0; - - for (rdev = rcu_dereference(conf->mirrors[new_disk].rdev); -- r1_bio->bios[new_disk] = IO_BLOCKED || +- r1_bio->bios[new_disk] == IO_BLOCKED || - !rdev || !test_bit(In_sync, &rdev->flags) - || test_bit(WriteMostly, &rdev->flags); - rdev = rcu_dereference(conf->mirrors[++new_disk].rdev)) { @@ -109,7 +109,7 @@ index ad83a4d..e29e13f 100644 - r1_bio->bios[new_disk] != IO_BLOCKED) - wonly_disk = new_disk; - -- if (new_disk = conf->raid_disks - 1) { +- if (new_disk == conf->raid_disks - 1) { - new_disk = wonly_disk; - break; - } @@ -125,7 +125,7 @@ index ad83a4d..e29e13f 100644 - /* make sure the disk is operational */ - for (rdev = rcu_dereference(conf->mirrors[new_disk].rdev); -- r1_bio->bios[new_disk] = IO_BLOCKED || +- r1_bio->bios[new_disk] == IO_BLOCKED || - !rdev || !test_bit(In_sync, &rdev->flags) || - test_bit(WriteMostly, &rdev->flags); - rdev = rcu_dereference(conf->mirrors[new_disk].rdev)) { @@ -137,7 +137,7 @@ index ad83a4d..e29e13f 100644 - if (new_disk <= 0) - new_disk = conf->raid_disks; - new_disk--; -- if (new_disk = disk) { +- if (new_disk == disk) { - new_disk = wonly_disk; - break; + for (i = 0 ; i < conf->raid_disks ; i++) { @@ -145,7 +145,7 @@ index ad83a4d..e29e13f 100644 + if (disk >= conf->raid_disks) + disk -= conf->raid_disks; + -+ if (r1_bio->bios[disk] = IO_BLOCKED ++ if (r1_bio->bios[disk] == IO_BLOCKED + || !(rdev = rcu_dereference(conf->mirrors[disk].rdev)) + || !test_bit(In_sync, &rdev->flags)) + continue; @@ -163,13 +163,13 @@ index ad83a4d..e29e13f 100644 goto rb_out; - disk = new_disk; -- /* now disk = new_disk = starting point for search */ +- /* now disk == new_disk == starting point for search */ - /* * Don't change to another disk for sequential reads: */ @@ -491,20 +474,20 @@ static int read_balance(conf_t *conf, r1bio_t *r1_bio) - if (this_sector = conf->mirrors[new_disk].head_position) + if (this_sector == conf->mirrors[new_disk].head_position) goto rb_out; - current_distance = abs(this_sector - conf->mirrors[disk].head_position); @@ -191,10 +191,10 @@ index ad83a4d..e29e13f 100644 - - rdev = rcu_dereference(conf->mirrors[disk].rdev); - -- if (!rdev || r1_bio->bios[disk] = IO_BLOCKED || +- if (!rdev || r1_bio->bios[disk] == IO_BLOCKED || - !test_bit(In_sync, &rdev->flags) || - test_bit(WriteMostly, &rdev->flags)) -+ if (r1_bio->bios[disk] = IO_BLOCKED ++ if (r1_bio->bios[disk] == IO_BLOCKED + || !(rdev = rcu_dereference(conf->mirrors[disk].rdev)) + || !test_bit(In_sync, &rdev->flags) + || test_bit(WriteMostly, &rdev->flags)) diff --git a/a/content_digest b/N2/content_digest index 71f762b..311243e 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -4,7 +4,7 @@ "ref\020100905203908.GA3228@merkur.ravnborg.org\0" "From\0Neil Brown <neilb@suse.de>\0" "Subject\0Re: [PATCH] md: do not use ++ in rcu_dereference() argument\0" - "Date\0Mon, 06 Sep 2010 05:29:31 +0000\0" + "Date\0Mon, 6 Sep 2010 15:29:31 +1000\0" "To\0Sam Ravnborg <sam@ravnborg.org>\0" "Cc\0Kulikov Vasiliy <segooon@gmail.com>" kernel-janitors@vger.kernel.org @@ -39,7 +39,7 @@ "> > The full code:\n" "> > \n" "> > \t\tfor (rdev = rcu_dereference(conf->mirrors[new_disk].rdev);\n" - "> > \t\t r1_bio->bios[new_disk] = IO_BLOCKED ||\n" + "> > \t\t r1_bio->bios[new_disk] == IO_BLOCKED ||\n" "> > \t\t !rdev || !test_bit(In_sync, &rdev->flags)\n" "> > \t\t\t || test_bit(WriteMostly, &rdev->flags);\n" "> > \t\t rdev = rcu_dereference(conf->mirrors[++new_disk].rdev)) {\n" @@ -48,7 +48,7 @@ "> > \t\t\t\tr1_bio->bios[new_disk] != IO_BLOCKED)\n" "> > \t\t\t\twonly_disk = new_disk;\n" "> > \n" - "> > \t\t\tif (new_disk = conf->raid_disks - 1) {\n" + "> > \t\t\tif (new_disk == conf->raid_disks - 1) {\n" "> > \t\t\t\tnew_disk = wonly_disk;\n" "> > \t\t\t\tbreak;\n" "> > \t\t\t}\n" @@ -115,7 +115,7 @@ "-\t\tnew_disk = 0;\n" "-\n" "-\t\tfor (rdev = rcu_dereference(conf->mirrors[new_disk].rdev);\n" - "-\t\t r1_bio->bios[new_disk] = IO_BLOCKED ||\n" + "-\t\t r1_bio->bios[new_disk] == IO_BLOCKED ||\n" "-\t\t !rdev || !test_bit(In_sync, &rdev->flags)\n" "-\t\t\t || test_bit(WriteMostly, &rdev->flags);\n" "-\t\t rdev = rcu_dereference(conf->mirrors[++new_disk].rdev)) {\n" @@ -124,7 +124,7 @@ "-\t\t\t\tr1_bio->bios[new_disk] != IO_BLOCKED)\n" "-\t\t\t\twonly_disk = new_disk;\n" "-\n" - "-\t\t\tif (new_disk = conf->raid_disks - 1) {\n" + "-\t\t\tif (new_disk == conf->raid_disks - 1) {\n" "-\t\t\t\tnew_disk = wonly_disk;\n" "-\t\t\t\tbreak;\n" "-\t\t\t}\n" @@ -140,7 +140,7 @@ "-\n" " \t/* make sure the disk is operational */\n" "-\tfor (rdev = rcu_dereference(conf->mirrors[new_disk].rdev);\n" - "-\t r1_bio->bios[new_disk] = IO_BLOCKED ||\n" + "-\t r1_bio->bios[new_disk] == IO_BLOCKED ||\n" "-\t !rdev || !test_bit(In_sync, &rdev->flags) ||\n" "-\t\t test_bit(WriteMostly, &rdev->flags);\n" "-\t rdev = rcu_dereference(conf->mirrors[new_disk].rdev)) {\n" @@ -152,7 +152,7 @@ "-\t\tif (new_disk <= 0)\n" "-\t\t\tnew_disk = conf->raid_disks;\n" "-\t\tnew_disk--;\n" - "-\t\tif (new_disk = disk) {\n" + "-\t\tif (new_disk == disk) {\n" "-\t\t\tnew_disk = wonly_disk;\n" "-\t\t\tbreak;\n" "+\tfor (i = 0 ; i < conf->raid_disks ; i++) {\n" @@ -160,7 +160,7 @@ "+\t\tif (disk >= conf->raid_disks)\n" "+\t\t\tdisk -= conf->raid_disks;\n" "+\n" - "+\t\tif (r1_bio->bios[disk] = IO_BLOCKED\n" + "+\t\tif (r1_bio->bios[disk] == IO_BLOCKED\n" "+\t\t || !(rdev = rcu_dereference(conf->mirrors[disk].rdev))\n" "+\t\t || !test_bit(In_sync, &rdev->flags))\n" "+\t\t\tcontinue;\n" @@ -178,13 +178,13 @@ " \t\tgoto rb_out;\n" " \n" "-\tdisk = new_disk;\n" - "-\t/* now disk = new_disk = starting point for search */\n" + "-\t/* now disk == new_disk == starting point for search */\n" "-\n" " \t/*\n" " \t * Don't change to another disk for sequential reads:\n" " \t */\n" "@@ -491,20 +474,20 @@ static int read_balance(conf_t *conf, r1bio_t *r1_bio)\n" - " \tif (this_sector = conf->mirrors[new_disk].head_position)\n" + " \tif (this_sector == conf->mirrors[new_disk].head_position)\n" " \t\tgoto rb_out;\n" " \n" "-\tcurrent_distance = abs(this_sector - conf->mirrors[disk].head_position);\n" @@ -206,10 +206,10 @@ "-\n" "-\t\trdev = rcu_dereference(conf->mirrors[disk].rdev);\n" "-\n" - "-\t\tif (!rdev || r1_bio->bios[disk] = IO_BLOCKED ||\n" + "-\t\tif (!rdev || r1_bio->bios[disk] == IO_BLOCKED ||\n" "-\t\t !test_bit(In_sync, &rdev->flags) ||\n" "-\t\t test_bit(WriteMostly, &rdev->flags))\n" - "+\t\tif (r1_bio->bios[disk] = IO_BLOCKED\n" + "+\t\tif (r1_bio->bios[disk] == IO_BLOCKED\n" "+\t\t || !(rdev = rcu_dereference(conf->mirrors[disk].rdev))\n" "+\t\t || !test_bit(In_sync, &rdev->flags)\n" "+\t\t || test_bit(WriteMostly, &rdev->flags))\n" @@ -230,4 +230,4 @@ " \t\trdev = rcu_dereference(conf->mirrors[new_disk].rdev);\n" " \t\tif (!rdev)" -a79198b2bc1b992be2a3d3804e52ad5aea930dbcd67e7d2c5144880c1159a97d +f8c3f5b97501ffdf2d54d6812fe08ee127f5d0eca025ce54b684625b1a2f7f10
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.