diff options
author | NeilBrown <neilb@suse.de> | 2006-01-06 03:20:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:34:04 -0500 |
commit | 9910f16af35419a5382fa7850eecc220103036fa (patch) | |
tree | 3b5145b8a706e03a6f2b4da4bd84fe98c83de31a /include/linux/raid | |
parent | cf30a473a02901fe4db37abc0b0fa26dd5ba3f72 (diff) |
[PATCH] md: fix up some rdev rcu locking in raid5/6
There is this "FIXME" comment with a typo in it!! that been annoying me for
days, so I just had to remove it.
conf->disks[i].rdev should only be accessed if
- we know we hold a reference or
- the mddev->reconfig_sem is down or
- we have a rcu_readlock
handle_stripe was referencing rdev in three places without any of these. For
the first two, get an rcu_readlock. For the last, the same access
(md_sync_acct call) is made a little later after the rdev has been claimed
under and rcu_readlock, if R5_Syncio is set. So just use that access...
However R5_Syncio isn't really needed as the 'syncing' variable contains the
same information. So use that instead.
Issues, comment, and fix are identical in raid5 and raid6.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/raid')
-rw-r--r-- | include/linux/raid/raid5.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index e9c1c0d4f90b..28fcd7533ac4 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
@@ -152,7 +152,6 @@ struct stripe_head { | |||
152 | #define R5_Insync 3 /* rdev && rdev->in_sync at start */ | 152 | #define R5_Insync 3 /* rdev && rdev->in_sync at start */ |
153 | #define R5_Wantread 4 /* want to schedule a read */ | 153 | #define R5_Wantread 4 /* want to schedule a read */ |
154 | #define R5_Wantwrite 5 | 154 | #define R5_Wantwrite 5 |
155 | #define R5_Syncio 6 /* this io need to be accounted as resync io */ | ||
156 | #define R5_Overlap 7 /* There is a pending overlapping request on this block */ | 155 | #define R5_Overlap 7 /* There is a pending overlapping request on this block */ |
157 | #define R5_ReadError 8 /* seen a read error here recently */ | 156 | #define R5_ReadError 8 /* seen a read error here recently */ |
158 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ | 157 | #define R5_ReWrite 9 /* have tried to over-write the readerror */ |