[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:
Related
is related to LU-10027 Unable to finish mount on MDS while ... Open
is related to LU-6831 The ticket for tracking all DNE2 bugs Reopened
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
Subject: LU-7050 llog: record the minimum record size
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 2d7e57831225c489e5efed8b3f227de21f90b488

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/
Subject: LU-7050 llog: record the minimum record size
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: f61148f758b30de91684c58053e4dad6159f8858

Comment by Joseph Gmitter (Inactive) [ 10/Sep/15 ]

Landed for 2.8.0

Generated at Sat Feb 10 02:05:34 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.