<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:28:51 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-9744] HS_DIRTY/CLF_HSM_DIRTY can be wrongly reported upon HSM action error</title>
                <link>https://jira.whamcloud.com/browse/LU-9744</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In hsm_cdt_request_completed() and upon error being returned from mdt_hsm_get_md_hsm(), where &quot;struct md_hsm mh&quot; has not been populated, HS_DIRTY can be wrongly detected and thus  CLF_HSM_DIRTY flag will be reported by error :&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;/**
 * get obj and HSM attributes on a fid
 * \param mti [IN] context
 * \param fid [IN] object fid
 * \param hsm [OUT] HSM meta data
 * \retval obj or error (-ENOENT if not found)
 */
struct mdt_object *mdt_hsm_get_md_hsm(struct mdt_thread_info *mti,
                                      const struct lu_fid *fid,
                                      struct md_hsm *hsm)
{
        struct md_attr          *ma;
        struct mdt_object       *obj;
        int                      rc;
        ENTRY;

        ma = &amp;amp;mti-&amp;gt;mti_attr;
        ma-&amp;gt;ma_need = MA_HSM;
        ma-&amp;gt;ma_valid = 0;

        /* find object by FID */
        obj = mdt_object_find(mti-&amp;gt;mti_env, mti-&amp;gt;mti_mdt, fid);
        if (IS_ERR(obj))
                RETURN(obj);

        if (!mdt_object_exists(obj)) {
                /* no more object */
                mdt_object_put(mti-&amp;gt;mti_env, obj);
                RETURN(ERR_PTR(-ENOENT));
        }

        rc = mdt_attr_get_complex(mti, obj, ma);
        if (rc) {
                mdt_object_put(mti-&amp;gt;mti_env, obj);
                RETURN(ERR_PTR(rc));
        }

        if (ma-&amp;gt;ma_valid &amp;amp; MA_HSM)
                *hsm = ma-&amp;gt;ma_hsm;
        else
                memset(hsm, 0, sizeof(*hsm));
        ma-&amp;gt;ma_valid = 0;
        RETURN(obj);
}

...................

/**
 * update status of a completed request
 * \param mti [IN] context
 * \param pgs [IN] progress of the copy tool
 * \param update_record [IN] update llog record
 * \retval 0 success
 * \retval -ve failure
 */
static int hsm_cdt_request_completed(struct mdt_thread_info *mti,
                                     struct hsm_progress_kernel *pgs,
                                     const struct cdt_agent_req *car,
                                     enum agent_req_status *status)
{
        const struct lu_env     *env = mti-&amp;gt;mti_env;
        struct mdt_device       *mdt = mti-&amp;gt;mti_mdt;
        struct coordinator      *cdt = &amp;amp;mdt-&amp;gt;mdt_coordinator;
        struct mdt_object       *obj = NULL;
        int                      cl_flags = 0, rc = 0;
        struct md_hsm            mh;
        bool                     is_mh_changed;
        bool                     need_changelog = true;
        ENTRY;

        /* default is to retry */
        *status = ARS_WAITING;

        /* find object by FID, mdt_hsm_get_md_hsm() returns obj or err
         * if error/removed continue anyway to get correct reporting done */
        obj = mdt_hsm_get_md_hsm(mti, &amp;amp;car-&amp;gt;car_hai-&amp;gt;hai_fid, &amp;amp;mh);
......................
        /* rc != 0 means error when analysing action, it may come from
         * a crasy CT no need to manage DIRTY
         */
        if (rc == 0)
                hsm_set_cl_flags(&amp;amp;cl_flags,
                                 mh.mh_flags &amp;amp; HS_DIRTY ? CLF_HSM_DIRTY : 0);
.......................
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;!IS_ERR(obj) should also be tested before adding CLF_HSM_DIRTY in cl_flags.&lt;/p&gt;

&lt;p&gt;This can be the cause of errors in associated sanity-hsm sub-tests test_220a, test_222c, test_222d, tests_224a, when analyzing ChangeLog flags.&lt;/p&gt;

</description>
                <environment></environment>
        <key id="47151">LU-9744</key>
            <summary>HS_DIRTY/CLF_HSM_DIRTY can be wrongly reported upon HSM action error</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="bfaccini">Bruno Faccini</assignee>
                                    <reporter username="bfaccini">Bruno Faccini</reporter>
                        <labels>
                    </labels>
                <created>Fri, 7 Jul 2017 14:23:58 +0000</created>
                <updated>Mon, 18 Mar 2019 03:14:22 +0000</updated>
                            <resolved>Sat, 5 Aug 2017 05:52:53 +0000</resolved>
                                                    <fixVersion>Lustre 2.10.1</fixVersion>
                    <fixVersion>Lustre 2.11.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="201344" author="gerrit" created="Fri, 7 Jul 2017 14:47:39 +0000"  >&lt;p&gt;Faccini Bruno (bruno.faccini@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/27962&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/27962&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9744&quot; title=&quot;HS_DIRTY/CLF_HSM_DIRTY can be wrongly reported upon HSM action error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9744&quot;&gt;&lt;del&gt;LU-9744&lt;/del&gt;&lt;/a&gt; mdt: avoid wrong CLF_HSM_DIRTY report in ChangeLog&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 04e9d7094e4e2c0e18e2d25877583639d416e248&lt;/p&gt;</comment>
                            <comment id="204550" author="gerrit" created="Sat, 5 Aug 2017 00:38:24 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/27962/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/27962/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9744&quot; title=&quot;HS_DIRTY/CLF_HSM_DIRTY can be wrongly reported upon HSM action error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9744&quot;&gt;&lt;del&gt;LU-9744&lt;/del&gt;&lt;/a&gt; mdt: avoid wrong CLF_HSM_DIRTY report in ChangeLog&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 1b6af5006d0a36615f059030b005d55d3c7bb45e&lt;/p&gt;</comment>
                            <comment id="204561" author="pjones" created="Sat, 5 Aug 2017 05:52:53 +0000"  >&lt;p&gt;Landed for 2.11&lt;/p&gt;</comment>
                            <comment id="204660" author="gerrit" created="Mon, 7 Aug 2017 14:51:42 +0000"  >&lt;p&gt;Minh Diep (minh.diep@intel.com) uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/28403&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28403&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9744&quot; title=&quot;HS_DIRTY/CLF_HSM_DIRTY can be wrongly reported upon HSM action error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9744&quot;&gt;&lt;del&gt;LU-9744&lt;/del&gt;&lt;/a&gt; mdt: avoid wrong CLF_HSM_DIRTY report in ChangeLog&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 46ee173c54d38bcec540fe46213414adcd9bb735&lt;/p&gt;</comment>
                            <comment id="205043" author="gerrit" created="Thu, 10 Aug 2017 16:27:56 +0000"  >&lt;p&gt;John L. Hammond (john.hammond@intel.com) merged in patch &lt;a href=&quot;https://review.whamcloud.com/28403/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/28403/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-9744&quot; title=&quot;HS_DIRTY/CLF_HSM_DIRTY can be wrongly reported upon HSM action error&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-9744&quot;&gt;&lt;del&gt;LU-9744&lt;/del&gt;&lt;/a&gt; mdt: avoid wrong CLF_HSM_DIRTY report in ChangeLog&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: b2_10&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 86421e70c1583f5691e516b7c216efdd9b241e99&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="48508">LU-10043</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzzg93:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>