[LU-15610] ofd can skip object version setting in case of error Created: 02/Mar/22  Updated: 02/Mar/22

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

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

Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

tgt_last_rcvd_update() skips version setting if result of transaction is not 0:

        if (th->th_result == 0 && obj != NULL) {
                struct dt_object *dto = dt_object_locate(obj, th->th_dev);
                dt_version_set(env, dto, tti->tti_transno, th);
        }

in turn, ofd_getattr_hdl() uses this version as "data version" for the client:

                /* Store object version in reply */
                curr_version = dt_version_get(tsi->tsi_env,
                                              ofd_object_child(fo));
                if ((__s64)curr_version != -EOPNOTSUPP) {
                        repbody->oa.o_valid |= OBD_MD_FLDATAVERSION;
                        repbody->oa.o_data_version = curr_version;
                }

the problem is that OSD can do few separate IOs within a single transaction and returns the result of the last one which can be non-zero due to an IO failure. IOW, some IOs can proceeed and change on-disk data, but the version won't get updated.

and then lfs mirror extend/resync won't notice if such a problem happens during data resyncing.


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