[LU-1117] lov_getref/putref incorrectly rely on a mutex protection Created: 17/Feb/12 Updated: 28/Feb/18 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.1.0, Lustre 1.8.7 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 10446 |
| Description |
|
lov_getref has this code: static void lov_getref(struct obd_device *obd) { struct lov_obd *lov = &obd->u.lov; /* nobody gets through here until lov_putref is done */ cfs_mutex_down(&lov->lov_lock); cfs_atomic_inc(&lov->lov_refcount); cfs_mutex_up(&lov->lov_lock); return; } I imagine Nathan tried to avoid some sort of a race while working on bug 9439, but in reality whatever was the race he imagined, it's still there. At the very least we need to just get rid of this locking here and in lov_putref() and also get rid of lov_lock() in total I suspect. |