[LU-11423] osc_extent_find sometimes walks full extent list Created: 24/Sep/18 Updated: 06/Nov/18 Resolved: 06/Nov/18 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.12.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Patrick Farrell (Inactive) | Assignee: | Patrick Farrell (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
osc_extent_find has an interesting little bug. osc_extent_find uses osc_extent_search to find a good candidate for merging the new page in to, then starts checking. osc_extent_search either the extent containing the offset request or the greatest previous extent, or null if no such extent exists. If search returns null, then find uses the first extent of the object. Basically, there are three possibilities, assuming there are some extents in the object:
In cases 2 and 3, the current code will continue to walk the extent list until next_extent is NULL. This is fine for small numbers of extents, but is hugely problematic for large, sparse files with small written extents, where we can get thousands and thousands of extents and most new writes will not merge with existing extents. This is trivial to fix - just stop walking the extent list once we've passed any extents we could match. Patch will be forthcoming shortly. |
| Comments |
| Comment by Gerrit Updater [ 24/Sep/18 ] |
|
Patrick Farrell (paf@cray.com) uploaded a new patch: https://review.whamcloud.com/33227 |
| Comment by Gerrit Updater [ 06/Nov/18 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/33227/ |
| Comment by Peter Jones [ 06/Nov/18 ] |
|
Landed for 2.12 |