[LU-7026] Suspicious condition in lfsck_layout_slave_exec_oit Created: 20/Aug/15 Updated: 10/Sep/15 Resolved: 10/Sep/15 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | nasf (Inactive) |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
In the master code we have this snippet in lfsck_layout_slave_exec_oit: if (oid > lls->lls_lastid) { if (!(lo->ll_flags & LF_CRASHED_LASTID)) { /* OFD may create new objects during LFSCK scanning. */ rc = lfsck_layout_lastid_reload(env, com, lls); if (unlikely(rc != 0)) { CDEBUG(D_LFSCK, "%s: layout LFSCK failed to " "reload LAST_ID for "LPX64": rc = %d\n", lfsck_lfsck2name(com->lc_lfsck), lls->lls_seq, rc); GOTO(unlock, rc); } if (oid <= lls->lls_lastid || lo->ll_flags & LF_CRASHED_LASTID) GOTO(unlock, rc = 0); Note that we are still in the !(lo->ll_flags & LF_CRASHED_LASTID) branch, so why test for it one more time? Was there something else in mind? |
| Comments |
| Comment by nasf (Inactive) [ 20/Aug/15 ] |
|
The lfsck_layout_lastid_reload() will be called inside the branch "if (!(lo->ll_flags & LF_CRASHED_LASTID)) {", and may set LF_CRASHED_LASTID. |
| Comment by Joseph Gmitter (Inactive) [ 21/Aug/15 ] |
|
Fan Yong, |
| Comment by Oleg Drokin [ 21/Aug/15 ] |
|
But I do not see lo to be passed into lfsck_layout_lastid_reload(), does it get to it in some other way? |
| Comment by nasf (Inactive) [ 21/Aug/15 ] |
|
"lo" is one of the member of "com" that is the parameter of lfsck_layout_lastid_reload(). |