[LU-15549] client doesn't send layout version if it's 0 Created: 11/Feb/22  Updated: 15/Feb/22

Status: Open
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Alex Zhuravlev Assignee: Alex Zhuravlev
Resolution: Unresolved Votes: 0
Labels: flr-improvement

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

the client doesn't set OBD_MD_LAYOUT_VERSION if current layout version is 0

                        if (io->ci_layout_version > 0) {
                                /* verify layout version */
                                oa->o_valid |= OBD_MD_LAYOUT_VERSION;

then OST just skips layout version check:

        /* need to verify layout version */
        if (oa->o_valid & OBD_MD_LAYOUT_VERSION) {
                rc = ofd_verify_layout_version(env, fo, oa);

all regular layouts are created with version 0, meaning that if client doesn't notice layout change for a reason (LU-15300 or eviction from MDS), then OST won't check version even if it's changed and propagated to OST already. this can result in silent data corruption.



 Comments   
Comment by Gerrit Updater [ 15/Feb/22 ]

"Alex Zhuravlev <bzzz@whamcloud.com>" uploaded a new patch: https://review.whamcloud.com/46531
Subject: LU-15549 lod: layout version shouldn't be zero
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 9fcdcbb7cb83f66cd825b26c91bea489557bba0a

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