[LU-14837] Layout corruption (lmm_oi) inside mdd_swap_layouts Created: 09/Jul/21  Updated: 21/Jul/21

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.0, Lustre 2.11.0, Lustre 2.12.0, Lustre 2.13.0
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Etienne Aujames Assignee: Etienne Aujames
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates LU-13426 "lfs migrate" on DoM component clobbe... Resolved
Related
is related to LU-13535 Files truncated/corruption due to lfsck Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The following code in mdd_swap_layouts is not valid for PFL layout:

         /* set the file specific informations in lmm */
         if (fst_lmm != NULL) {
                 saved_oi = &info->mti_oa.o_oi;
                 mdd_get_lmm_oi(fst_lmm, saved_oi);
                 mdd_set_lmm_gen(fst_lmm, &snd_gen);
           ----> mdd_set_lmm_oi(fst_lmm, &snd_lmm->lmm_oi);
                 mdd_set_lmm_oi(snd_lmm, saved_oi);
         } else {

For PFL layout, snd_lmm does not point directly to a lov_mds_md structure but on a lov_comp_md_v1 structure.

We have to access to the different component entries defined inside lov_comp_md_v1 and then apply offsets to access to the lov_mds_md structures.

LFSK can correct this inconsistencies. this will increment the "inconsistencies_other/repaired_other" counter.

WARNING:

Do not try to run LFSCK on a 2.12.4 for this. This will corrupted every migrated layouts because of the LU-13535 "Files truncated/corruption due to lfsck"



 Comments   
Comment by Etienne Aujames [ 09/Jul/21 ]

This is a duplicate of the LU-13426.

I will backport the patch https://review.whamcloud.com/38172  ("LU-13426 mdd: correctly swap OIs during migration").

Comment by Etienne Aujames [ 09/Jul/21 ]

b2_12 backport : https://review.whamcloud.com/44202/

Generated at Sat Feb 10 03:13:13 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.