<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:27:15 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-16465] truncate does not update the LSOM blocks correctly</title>
                <link>https://jira.whamcloud.com/browse/LU-16465</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&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;[root@client client]# touch test                                          
[root@client client]# dd if=/dev/zero of=test bs=1M count=2 conv=fsync    
2+0 records in                                                            
2+0 records out                                                           
2097152 bytes (2.1 MB) copied, 0.0265768 s, 78.9 MB/s                     
[root@client client]# lfs getsom test &amp;amp;&amp;amp; stat test                        
file: test size: 2097152 blocks: 0 flags: 4                               
  File: &#8216;test&#8217;                                                            
  Size: 2097152         Blocks: 4096       IO Block: 4194304 regular file 
Device: 481510a2h/1209340066d   Inode: 144115205289279523  Links: 1       
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)  
Access: 2023-01-12 20:41:15.000000000 +0100                               
Modify: 2023-01-12 20:41:28.000000000 +0100                               
Change: 2023-01-12 20:41:28.000000000 +0100                               
 Birth: -                                                                 
[root@client client]# cat test                                            
[root@client client]# lfs getsom test &amp;amp;&amp;amp; stat test                        
file: test size: 2097152 blocks: 4096 flags: 4                              &amp;lt;--- inode i_blocks are update by the open-close
  File: &#8216;test&#8217;                                                            
  Size: 2097152         Blocks: 4096       IO Block: 4194304 regular file 
Device: 481510a2h/1209340066d   Inode: 144115205289279523  Links: 1       
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)  
Access: 2023-01-12 20:41:39.000000000 +0100                               
Modify: 2023-01-12 20:41:28.000000000 +0100                               
Change: 2023-01-12 20:41:28.000000000 +0100                               
 Birth: -                                                                 
[root@client client]# truncate -s1K test                                  
[root@client client]# lfs getsom test &amp;amp;&amp;amp; stat test                        
file: test size: 1024 blocks: 4096 flags: 4                                 &amp;lt;--- inode i_blocks are not update after the truncate, so close request sends the old value
  File: &#8216;test&#8217;                                                            
  Size: 1024            Blocks: 8          IO Block: 4194304 regular file 
Device: 481510a2h/1209340066d   Inode: 144115205289279523  Links: 1       
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)  
Access: 2023-01-12 20:41:39.000000000 +0100                               
Modify: 2023-01-12 20:42:27.000000000 +0100                               
Change: 2023-01-12 20:42:27.000000000 +0100                               
 Birth: -                                                                 
[root@client client]# cat test                                            
[root@client client]# lfs getsom test &amp;amp;&amp;amp; stat test                        
file: test size: 1024 blocks: 4096 flags: 4                                 &amp;lt;---- MDT denies blocks update from the client (only truncate are allowed to decrease the blocks count).
  File: &#8216;test&#8217;                                                            
  Size: 1024            Blocks: 8          IO Block: 4194304 regular file 
Device: 481510a2h/1209340066d   Inode: 144115205289279523  Links: 1       
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)  
Access: 2023-01-12 20:42:56.000000000 +0100                               
Modify: 2023-01-12 20:42:27.000000000 +0100                               
Change: 2023-01-12 20:42:27.000000000 +0100                               
 Birth: -                                                                 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;On the MDT:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-c&quot;&gt;
&lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt;&lt;/span&gt; mdt_lsom_update(&lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; mdt_thread_info *info,       
                    &lt;span class=&quot;code-keyword&quot;&gt;struct&lt;/span&gt; mdt_object *o, &lt;span class=&quot;code-keyword&quot;&gt;&lt;span class=&quot;code-object&quot;&gt;bool&lt;/span&gt;&lt;/span&gt; truncate)
....
        if (!(la-&amp;gt;la_valid &amp;amp; (LA_SIZE | LA_LSIZE) &amp;amp;&amp;amp;              
              o-&amp;gt;mot_lsom_size &lt;span class=&quot;code-quote-red&quot;&gt;&amp;lt; la-&amp;gt;&lt;/span&gt;la_size) &amp;amp;&amp;amp;                  
            !(la-&amp;gt;la_valid &amp;amp; (LA_BLOCKS | LA_LBLOCKS) &amp;amp;&amp;amp;          
              o-&amp;gt;mot_lsom_blocks &lt;span class=&quot;code-quote-red&quot;&gt;&amp;lt; la-&amp;gt;&lt;/span&gt;la_blocks) &amp;amp;&amp;amp; !truncate &amp;amp;&amp;amp;    &amp;lt;---- refuse to update LSOM from close request&lt;span class=&quot;code-keyword&quot;&gt; if&lt;/span&gt; new_blocks_value &amp;lt; old_blocks_value
            o-&amp;gt;mot_lsom_inited)                                   
                RETURN(0);                                        
....
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
        <key id="73957">LU-16465</key>
            <summary>truncate does not update the LSOM blocks correctly</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="eaujames">Etienne Aujames</assignee>
                                    <reporter username="eaujames">Etienne Aujames</reporter>
                        <labels>
                    </labels>
                <created>Thu, 12 Jan 2023 20:00:54 +0000</created>
                <updated>Tue, 25 Apr 2023 03:36:13 +0000</updated>
                            <resolved>Sat, 22 Apr 2023 18:19:13 +0000</resolved>
                                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="359447" author="gerrit" created="Wed, 18 Jan 2023 09:49:28 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49675&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49675&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16465&quot; title=&quot;truncate does not update the LSOM blocks correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16465&quot;&gt;&lt;del&gt;LU-16465&lt;/del&gt;&lt;/a&gt; llite: fix LSOM blocks for ftruncate and close&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 00b2c5888959c81ec195bb5c853c948630aac13e&lt;/p&gt;</comment>
                            <comment id="369131" author="gerrit" created="Tue, 11 Apr 2023 20:08:33 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/49675/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/49675/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16465&quot; title=&quot;truncate does not update the LSOM blocks correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16465&quot;&gt;&lt;del&gt;LU-16465&lt;/del&gt;&lt;/a&gt; llite: fix LSOM blocks for ftruncate and close&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: dfb08bbf77a1362f79c3738cc3952f8db2e46511&lt;/p&gt;</comment>
                            <comment id="369151" author="gerrit" created="Tue, 11 Apr 2023 20:25:38 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50606&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50606&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16465&quot; title=&quot;truncate does not update the LSOM blocks correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16465&quot;&gt;&lt;del&gt;LU-16465&lt;/del&gt;&lt;/a&gt; tests: update sanity test 806 to use save/restore_opencache&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: bca8875bdb08e1c15fc46902b2dd5a215a4e33a5&lt;/p&gt;</comment>
                            <comment id="370249" author="gerrit" created="Sat, 22 Apr 2023 17:32:25 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/50606/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/50606/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16465&quot; title=&quot;truncate does not update the LSOM blocks correctly&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16465&quot;&gt;&lt;del&gt;LU-16465&lt;/del&gt;&lt;/a&gt; tests: update sanity test 806 to use save/restore_opencache&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 3ba223327f357f3da9ab81b6808422c4b0a9fbc3&lt;/p&gt;</comment>
                            <comment id="370254" author="pjones" created="Sat, 22 Apr 2023 18:19:13 +0000"  >&lt;p&gt;Landed for 2.16&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="64670">LU-14765</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                                        </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|i039rj:</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>