<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:31:06 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-16920] CSDC: store and report compression flag on OST and MDT objects</title>
                <link>https://jira.whamcloud.com/browse/LU-16920</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;In order to allow device-level scanners to detect compressed OST objects (and to a lesser extent compressed MDT DoM objects) during scanning, it makes sense to store a flag on each OST object that is storing compressed data.  This will allow the scanner to identify compressed objects, for example to compute the compression ratio during an OST-levels scan, and/or implement other policies during scanning without having the full file layout.&lt;/p&gt;

&lt;p&gt;While there is an existing &lt;tt&gt;EXT4_COMPR_FL&lt;/tt&gt; that could be stored on the ldiskfs inode for this purpose, it may have adverse interactions with ext4 or e2fsck now or in the future, if ext4-level compression is ever implemented.&lt;/p&gt;

&lt;p&gt;Instead, we should store the compressed object state with &lt;tt&gt;LMAC_COMPRESSED=0x00000080&lt;/tt&gt; in the &lt;tt&gt;trusted.lma&lt;/tt&gt; xattr on each object.  I don&apos;t believe that the storage of compressed objects should need an &lt;tt&gt;LMAI_COMPRESSED&lt;/tt&gt; (incompatible) flag, since there is nothing on the OST that needs to be aware of this state during a read, since the decompression is handled entirely on the client.&lt;/p&gt;

&lt;p&gt;The OST would be informed by the client about the presence of compressed data with the &lt;tt&gt;OBD_BRW_COMPRESSED&lt;/tt&gt; flag added in patch &lt;a href=&quot;https://review.whamcloud.com/50154&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/50154&lt;/a&gt; &quot;&lt;tt&gt;&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16603&quot; title=&quot;OBD_BRW_COMPRESSED flag&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16603&quot;&gt;&lt;del&gt;LU-16603&lt;/del&gt;&lt;/a&gt; protocol: add OBD_BRW_COMPRESSED&lt;/tt&gt;&quot;.&lt;/p&gt;

&lt;p&gt;Other than saving the flag on the OST object one time, there is no other action required by the OST in this case.&lt;/p&gt;

&lt;p&gt;For non-DoM files, the MDT will not see the &lt;tt&gt;OBD_BRW_COMPRESSED&lt;/tt&gt; flag.  The MDS could set the &lt;tt&gt;LMAC_COMPRESSED&lt;/tt&gt; flag in &lt;tt&gt;trusted.xattr&lt;/tt&gt; as soon as a compressed component is instantiated.&lt;/p&gt;

&lt;p&gt;The MDS should report the &lt;tt&gt;LMAC_COMPRESSED&lt;/tt&gt; flag in the inode flags as &lt;tt&gt;LUSTRE_COMPR_FL=FS_COMPR_FL=0x00000004&lt;/tt&gt;, similar to &lt;tt&gt;LUSTRE_ENCRYPT_FL&lt;/tt&gt;, so that the compression state can be displayed on the client via &lt;tt&gt;lsattr&lt;/tt&gt;.  It should report &lt;tt&gt;STATX_ATTR_COMPRESSED=0x00000004&lt;/tt&gt; via &lt;tt&gt;statx()&lt;/tt&gt;, similar to &lt;tt&gt;STATX_ATTR_ENCRYPTED&lt;/tt&gt;.&lt;/p&gt;</description>
                <environment></environment>
        <key id="76665">LU-16920</key>
            <summary>CSDC: store and report compression flag on OST and MDT objects</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="bobijam">Zhenyu Xu</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>csdc</label>
                    </labels>
                <created>Wed, 21 Jun 2023 19:39:02 +0000</created>
                <updated>Mon, 22 Jan 2024 15:55:34 +0000</updated>
                                                            <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="376172" author="paf0186" created="Wed, 21 Jun 2023 20:20:23 +0000"  >&lt;p&gt;Andreas,&lt;/p&gt;

&lt;p&gt;Hmm.&#160; If we&apos;re going to store &quot;compressed or not&quot; in the server side objects, would it be reasonable to also store the compression chunk size?&#160; I understand if space usage or other concerns dominate, but this would make it possible for the server to round lock grants to chunk size.&#160; This comes up specifically for locks the server is extending, where the server controls the lock boundary that results.&lt;/p&gt;

&lt;p&gt;It&apos;s a relatively small case - in practice, we&apos;ll have the clients rounding their dlmlock requests to chunk size boundaries, and that should (again, in practice) result in the server always ending up on chunk boundaries, even under contention.&#160; (Because it is under contention that locks can end up at unusual sizes.&#160; Without contention it doesn&apos;t happen.)&lt;/p&gt;

&lt;p&gt;But it would have a certain comfort factor for the server to only grant locks on chunk boundaries as well, which would be straightforward if the server also had the chunk bits.&#160; (Technically only the OST objects would need this, since DOM locks are always full object, but...)&lt;/p&gt;</comment>
                            <comment id="376187" author="paf0186" created="Thu, 22 Jun 2023 01:34:26 +0000"  >&lt;p&gt;Andreas pointed out elsewhere that we actually already round all LDLM lock grants to be aligned to the start/end of the lock as requested by the client.&#160; This will ensure that all locks are chunk aligned as granted by the server.&#160; Very nice.&lt;/p&gt;</comment>
                            <comment id="376857" author="adilger" created="Thu, 29 Jun 2023 03:50:20 +0000"  >&lt;blockquote&gt;
&lt;p&gt;If we&apos;re going to store &quot;compressed or not&quot; in the server side objects, would it be reasonable to also store the compression chunk size?  I understand if space usage or other concerns dominate, but this would make it possible for the server to round lock grants to chunk size.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Storing the compression chunk size on the OST objects would be desirable to help LFSCK reconstruct the LOV file layout in case it was corrupted/lost on the MDT. We already store other parts of the file layout on each OST object for this exact reason, so it makes sense to do the same for the compressed chunk size.   However, this is not critical, since it would also be possible for LFSCK to read the first (or any) allocated chunk of a file to determine the chunk size used and other compression parameters, as long as it knows that this is a compressed file.&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-java&quot;&gt;
#define LLCH_MAGIC 0xC0398E55DA7A
&lt;span class=&quot;code-comment&quot;&gt;/* Compression chunk header */&lt;/span&gt;
struct ll_compr_hdr {
        __u64 llch_magic:48;     &lt;span class=&quot;code-comment&quot;&gt;/* LLCH_MAGIC */&lt;/span&gt;
        __u8  llch_header_size;  &lt;span class=&quot;code-comment&quot;&gt;/* = 32, &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;code-keyword&quot;&gt;future&lt;/span&gt; extensions */&lt;/span&gt;
        __u8  llch_exta_flags;
        __u8  llch_compr_type;    &lt;span class=&quot;code-comment&quot;&gt;/* LL_COMPR_TYPE_* */&lt;/span&gt;
        __u8  llch_compr_level:4; &lt;span class=&quot;code-comment&quot;&gt;/* per-algorithm mapped level */&lt;/span&gt;
        __u8  llch_flags:4;
        __u8  llch_chunk_log_bits;  &lt;span class=&quot;code-comment&quot;&gt;/* log2(chunk_size) - 16 */&lt;/span&gt;
        __u32 llch_compr_size;    &lt;span class=&quot;code-comment&quot;&gt;/* bytes of compressed data */&lt;/span&gt;
        __u32 llch_reserved;     &lt;span class=&quot;code-comment&quot;&gt;/* unused, initialize to 0 */&lt;/span&gt;
        __u32 llch_uncompr_csum; &lt;span class=&quot;code-comment&quot;&gt;/* crc32 of raw data, or 0 */&lt;/span&gt;
        __u32 llch_compr_csum;   &lt;span class=&quot;code-comment&quot;&gt;/* crc32 of compressed data, or 0 */&lt;/span&gt;
        __u32 llch_hdr_csum;     &lt;span class=&quot;code-comment&quot;&gt;/* crc32 of magic..compr_csum, or 0 */&lt;/span&gt;
};
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10010">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                                        </outwardlinks>
                                                        </issuelinktype>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="74873">LU-16603</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|i03olz:</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>