[LU-14012] new layout incompletely initialized in lod_layout_convert() Created: 06/Oct/20  Updated: 29/Oct/20  Resolved: 19/Oct/20

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.12.0, Lustre 2.14.0
Fix Version/s: Lustre 2.14.0, Lustre 2.12.6

Type: Bug Priority: Minor
Reporter: John Hammond Assignee: John Hammond
Resolution: Fixed Votes: 0
Labels: None

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

In lod_layout_convert() the composite layout generated as a result of conversion is only partially initialized. Some member of lcm and lcme (including lcme_id) are filled with left-over garbage from previous uses of lti_ea_store.

# rm -f /mnt/lustre/f0
# echo XXX > /mnt/lustre/f0
# lfs mirror extend -N /mnt/lustre/f0
# lfs getstripe /mnt/lustre/f0 | grep lcme_mirror_id
    lcme_mirror_id:      1
    lcme_mirror_id:      2


# lctl pool_new lustre.garbage
Pool lustre.garbage created
# lctl pool_add lustre.garbage lustre-OST0000
OST lustre-OST0000_UUID added to pool lustre.garbage
# lfs setstripe -p garbage /mnt/lustre
# rm -f /mnt/lustre/f0
# echo XXX > /mnt/lustre/f0
# lfs mirror extend -N /mnt/lustre/f0
 lfs getstripe /mnt/lustre/f0 | grep lcme_mirror_id
    lcme_mirror_id:      25202
    lcme_mirror_id:      25203
# lfs getstripe /mnt/lustre/f0 | grep lcme_id
    lcme_id:             1651663207
    lcme_id:             1651703809
# printf '%x\n' 1651663207
62726167
# echo -n garbage | hexdump
0000000    6167    6272    6761    0065                                
0000007

As seen above, one result of this is that mirror ids may not start at 1.



 Comments   
Comment by Gerrit Updater [ 06/Oct/20 ]

John L. Hammond (jhammond@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40153
Subject: LU-14012 lod: properly initialize lcm in lod_layout_convert()
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 33adb90ed7161fecbab6bd8b1f8bd860d9f317eb

Comment by Gerrit Updater [ 19/Oct/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40153/
Subject: LU-14012 lod: properly initialize lcm in lod_layout_convert()
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 6f2a1c911f0a326765e6d11f35bb602daf057948

Comment by Peter Jones [ 19/Oct/20 ]

Landed for 2.14

Comment by Gerrit Updater [ 20/Oct/20 ]

Jian Yu (yujian@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/40306
Subject: LU-14012 lod: properly initialize lcm in lod_layout_convert()
Project: fs/lustre-release
Branch: b2_12
Current Patch Set: 1
Commit: 472c911fb8b9ac0512ba285d4b1ffdda47c60449

Comment by Gerrit Updater [ 29/Oct/20 ]

Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/40306/
Subject: LU-14012 lod: properly initialize lcm in lod_layout_convert()
Project: fs/lustre-release
Branch: b2_12
Current Patch Set:
Commit: 5f869f1b7d5841cc31236eb537e487e6cf0997ad

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