lkml.org 
[lkml]   [2005]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] identify raid rcu-protected pointer
To provide further background to the recently submitted patch,
please let me note the following in regard to the commented
question in read_balance() of raid1.c

diff linux-2.6.13-rc6/drivers/md/raid1.c linux-2.6.14-rc4/drivers/md/raid1.c

changed to 379,383c419,428
< while ((new_rdev=conf->mirrors[new_disk].rdev) == NULL ||
< !new_rdev->in_sync) {
< new_disk++;
< if (new_disk == conf->raid_disks) {
< new_disk = -1;
---
> for (rdev = conf->mirrors[new_disk].rdev;
> !rdev || !rdev->in_sync
> || test_bit(WriteMostly, &rdev->flags);
> rdev = conf->mirrors[++new_disk].rdev) {
>
> if (rdev && rdev->in_sync)
> wonly_disk = new_disk;
>
> if (new_disk == conf->raid_disks - 1) {
> new_disk = wonly_disk;
392,393c437,444
< while ((new_rdev=conf->mirrors[new_disk].rdev) == NULL ||
< !new_rdev->in_sync) {
---
> for (rdev = conf->mirrors[new_disk].rdev;
> !rdev || !rdev->in_sync ||
> test_bit(WriteMostly, &rdev->flags);
> rdev = conf->mirrors[new_disk].rdev) {
>

On the second revision section, one would consider rcu_dereference()
on both "rdev =" occurrences, but expr3 is not apparently changing, so
comparing it to the earlier "for loop" elicits my question.
Thank you.
Suzanne

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-10-12 00:37    [W:0.018 / U:0.416 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site