[LU-7050] llog_skip_over skip the record by too little minimum record size. Created: 27/Aug/15 Updated: 31/Jan/18 Resolved: 10/Sep/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.8.0 |
| Fix Version/s: | Lustre 2.8.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Di Wang | Assignee: | Di Wang |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Severity: | 3 | ||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||
| Description |
|
During processing llog records, it needs to locate the record by the start_index, and if start_index is not zero, it will first try to skip some records to avoid reading too much useless records (see llog_process_thread). In current implementation, llog_skip_over will skip the record by LLOG_MIN_REC_SIZE, only 24 bytes, which is too less for update record (usually around 1000 bytes). static inline void llog_skip_over(struct llog_log_hdr *llh, __u64 *off,
int curr, int goal, __u32 chunk_size)
{
if (goal > curr) {
if (llh->llh_size == 0) {
/* variable size records */
*off = *off + (goal - curr - 1) * LLOG_MIN_REC_SIZE;
} else {
*off = chunk_size + (goal - 1) * llh->llh_size;
}
}
/* always align with lower chunk boundary*/
*off &= ~(chunk_size - 1);
}
So we probably should record the minimum record size in llog_osd_write_rec() and remember it in llh_size (in llog header), which is only used by fixed size llog record for now. |
| Comments |
| Comment by Gerrit Updater [ 27/Aug/15 ] |
|
wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/16103 |
| Comment by James A Simmons [ 28/Aug/15 ] |
|
I see two patches that look alike for this ticket. Which one to use? |
| Comment by Di Wang [ 29/Aug/15 ] |
|
Use 16103. |
| Comment by Gerrit Updater [ 10/Sep/15 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16103/ |
| Comment by Joseph Gmitter (Inactive) [ 10/Sep/15 ] |
|
Landed for 2.8.0 |