<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:37:17 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-3832] osc_io_read_start() ignores O_NOATIME, updates i_atime</title>
                <link>https://jira.whamcloud.com/browse/LU-3832</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;I find two issues with osc_io_read_start(). It updates the i_atime without checking O_NOATIME in f_flags. It calls cl_object_attr_get() for no reason that I can discern.&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;static int osc_io_read_start(const struct lu_env *env,
                             const struct cl_io_slice *slice)
{
        struct osc_io    *oio   = cl2osc_io(env, slice);
        struct cl_object *obj   = slice-&amp;gt;cis_obj;
        struct cl_attr   *attr  = &amp;amp;osc_env_info(env)-&amp;gt;oti_attr;
        int              result = 0;
        ENTRY;

        if (oio-&amp;gt;oi_lockless == 0) {
                cl_object_attr_lock(obj);
                result = cl_object_attr_get(env, obj, attr);
                if (result == 0) {
                        attr-&amp;gt;cat_atime = LTIME_S(CFS_CURRENT_TIME);
                        result = cl_object_attr_set(env, obj, attr,
                                                    CAT_ATIME);
                }
                cl_object_attr_unlock(obj);
        }
        RETURN(result);
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The upper layer will also update i_atime if this is appropriate, so I propose adding a noatime bit to struct cl_io and only updating the LVB atime for the current OSC object if that bit is set.&lt;/p&gt;

&lt;p&gt;osc_io_write_start() similarly calls cl_object_attr_get() before doing &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;        attr-&amp;gt;cat_mtime = attr-&amp;gt;cat_ctime =
                                LTIME_S(CFS_CURRENT_TIME);
        result = cl_object_attr_set(env, obj, attr,
                                    CAT_MTIME | CAT_CTIME);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I cannot find any reason for first calling cl_object_attr_get() here. Am I missing something?&lt;/p&gt;</description>
                <environment></environment>
        <key id="20599">LU-3832</key>
            <summary>osc_io_read_start() ignores O_NOATIME, updates i_atime</summary>
                <type id="7" iconUrl="https://jira.whamcloud.com/images/icons/issuetypes/task_agile.png">Technical task</type>
                            <parent id="20020">LU-3647</parent>
                                    <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</priority>
                        <status id="6" iconUrl="https://jira.whamcloud.com/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="jhammond">John Hammond</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                    </labels>
                <created>Fri, 23 Aug 2013 17:48:23 +0000</created>
                <updated>Fri, 30 Aug 2013 19:18:42 +0000</updated>
                            <resolved>Fri, 30 Aug 2013 19:18:26 +0000</resolved>
                                    <version>Lustre 2.5.0</version>
                                    <fixVersion>Lustre 2.5.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="64995" author="jay" created="Fri, 23 Aug 2013 18:56:11 +0000"  >&lt;p&gt;Yes, the first cl_object_attr_get() is not necessary.&lt;/p&gt;</comment>
                            <comment id="65004" author="jhammond" created="Fri, 23 Aug 2013 19:50:39 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/7442&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/7442&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="65005" author="jhammond" created="Fri, 23 Aug 2013 19:53:19 +0000"  >&lt;p&gt;This partially addresses some HSM test failures: test 24 requires that archive and release not change the atime.&lt;/p&gt;</comment>
                            <comment id="65010" author="jhammond" created="Fri, 23 Aug 2013 20:13:08 +0000"  >&lt;p&gt;Also note that the kernel&apos;s file_accessed() has a more complicated set of rules (including checking the SB for noatime) which should be incorporated into ll_io_init() at some point.&lt;/p&gt;</comment>
                            <comment id="65439" author="jhammond" created="Fri, 30 Aug 2013 14:22:50 +0000"  >&lt;p&gt;The rules used in file_accessed() and touch_atime() have been incorporated into the ci_noatime setting logic.&lt;/p&gt;</comment>
                            <comment id="65474" author="jhammond" created="Fri, 30 Aug 2013 19:18:26 +0000"  >&lt;p&gt;Patch landed to master.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="20736">LU-3868</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|hzvz53:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9904</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>