<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:25:39 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-9375] llog files have less number of records than they designed</title>
                <link>https://jira.whamcloud.com/browse/LU-9375</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The default bitmap size for llog file is 64768, so it can store 64767 records. llog_cat_add fills one plain llog file to full size then go to another plain llog file. Right now, I see that this logic was broken. &lt;br/&gt;
single node reproducer on top of master branch eb3379162c.&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;[root@localhost intelgerrit]# sh luste/tests/llmount.sh
[root@localhost intelgerrit]# lctl --device lustre-MDT0000 changelog_register
lustre-MDT0000: Registered changelog userid &apos;cl1&apos;
[root@localhost intelgerrit]# mkdir /mnt/lustre/test
[root@localhost intelgerrit]# lustre/tests/createmany -o /mnt/lustre/test/foo- 64768
 - open/close 10000 (time 1492674148.41 total 5.24 last 1909.71)
 - open/close 20000 (time 1492674153.50 total 10.33 last 1963.04)
 - open/close 30000 (time 1492674158.39 total 15.22 last 2044.79)
 - open/close 40000 (time 1492674163.59 total 20.42 last 1923.54)
 - open/close 50000 (time 1492674168.46 total 25.29 last 2055.37)
 - open/close 60000 (time 1492674173.32 total 30.15 last 2055.01)
total: 64768 open/close in 32.60 seconds: 1986.96 ops/second
[root@localhost ~]# debugfs -R &quot;dump changelog_catalog changelog_catalog&quot; /tmp/lustre-mdt1 
debugfs 1.42.13.x3 (26-Dec-2016)

[root@localhost ~]# llog_reader changelog_catalog  | tail -n13
#01 (064)id=[0x7:0x1:0x0]:0 path=oi.1/0x1:0x7:0x0
#02 (064)id=[0x8:0x1:0x0]:0 path=oi.1/0x1:0x8:0x0
#03 (064)id=[0x9:0x1:0x0]:0 path=oi.1/0x1:0x9:0x0
#04 (064)id=[0xa:0x1:0x0]:0 path=oi.1/0x1:0xa:0x0
#05 (064)id=[0xb:0x1:0x0]:0 path=oi.1/0x1:0xb:0x0
#06 (064)id=[0xc:0x1:0x0]:0 path=oi.1/0x1:0xc:0x0
#07 (064)id=[0xd:0x1:0x0]:0 path=oi.1/0x1:0xd:0x0
#08 (064)id=[0xe:0x1:0x0]:0 path=oi.1/0x1:0xe:0x0
#09 (064)id=[0xf:0x1:0x0]:0 path=oi.1/0x1:0xf:0x0
#10 (064)id=[0x10:0x1:0x0]:0 path=oi.1/0x1:0x10:0x0
#11 (064)id=[0x11:0x1:0x0]:0 path=oi.1/0x1:0x11:0x0
#12 (064)id=[0x12:0x1:0x0]:0 path=oi.1/0x1:0x12:0x0
#13 (064)id=[0x13:0x1:0x0]:0 path=oi.1/0x1:0x13:0x0

[root@localhost ~]# debugfs -R &quot;dump /O/1/d7/7 plain_1&quot; /tmp/lustre-mdt1 
debugfs 1.42.13.x3 (26-Dec-2016)
[root@localhost ~]# llog_reader plain_1 | tail
#11994 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#11995 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#11996 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#11997 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#11998 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#11999 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#12000 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#12001 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#12002 (128)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#12003 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)

[root@localhost ~]# debugfs -R &quot;dump /O/1/d8/8 plain_2&quot; /tmp/lustre-mdt1 
debugfs 1.42.13.x3 (26-Dec-2016)
[root@localhost ~]# llog_reader plain_2 | tail
#11627 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#11628 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#11629 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#11630 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#11631 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#11632 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#11633 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#11634 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#11635 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#11636 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)

[root@localhost ~]# debugfs -R &quot;dump /O/1/d16/16 plain_10&quot; /tmp/lustre-mdt1 
debugfs 1.42.13.x3 (26-Dec-2016)
[root@localhost ~]# llog_reader plain_10 | tail
#9529 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#9530 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#9531 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#9532 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#9533 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#9534 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#9535 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#9536 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
#9537 (120)changelog record id:0x0 cr_flags:0x5043 cr_type:CLOSE(0xb)
#9538 (136)changelog record id:0x0 cr_flags:0x5000 cr_type:CREAT(0x1)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;So every plain llog file stores about ~11k records instead of 64k. &lt;/p&gt;</description>
                <environment></environment>
        <key id="45621">LU-9375</key>
            <summary>llog files have less number of records than they designed</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="2" iconUrl="https://jira.whamcloud.com/images/icons/priorities/critical.svg">Critical</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="bfaccini">Bruno Faccini</assignee>
                                    <reporter username="aboyko">Alexander Boyko</reporter>
                        <labels>
                    </labels>
                <created>Thu, 20 Apr 2017 17:46:13 +0000</created>
                <updated>Fri, 21 Apr 2017 09:44:39 +0000</updated>
                                            <version>Lustre 2.10.0</version>
                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                            <comments>
                            <comment id="192946" author="bfaccini" created="Thu, 20 Apr 2017 23:56:23 +0000"  >&lt;p&gt;Well this seems to be caused by this piece of code in llog_osd_write_rec() :&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; 377 static int llog_osd_write_rec(const struct lu_env *env,
 378                               struct llog_handle *loghandle,
 379                               struct llog_rec_hdr *rec,
 380                               struct llog_cookie *reccookie,
 381                               int idx, struct thandle *th)
 382 {    
.................
 559         if (loghandle-&amp;gt;lgh_max_size &amp;gt; 0 &amp;amp;&amp;amp;
 560             lgi-&amp;gt;lgi_off &amp;gt;= loghandle-&amp;gt;lgh_max_size) {
 561                 CDEBUG(D_OTHER, &quot;llog is getting too large (%u &amp;gt; %u) at %u &quot;
 562                        DOSTID&quot;\n&quot;, (unsigned)lgi-&amp;gt;lgi_off,
 563                        loghandle-&amp;gt;lgh_max_size,
 564                        (int)loghandle-&amp;gt;lgh_last_idx,
 565                        POSTID(&amp;amp;loghandle-&amp;gt;lgh_id.lgl_oi));
 566                 /* this is to signal that this llog is full */
 567                 loghandle-&amp;gt;lgh_last_idx = LLOG_HDR_BITMAP_SIZE(llh) - 1;
 568                 RETURN(-ENOSPC);
 569         }
................
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;this new limitation code comes from this patch :&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;commit 4724b52bba54ccdb0f81d0c63010b69e87e7f65c
Author: Alex Zhuravlev &amp;lt;alexey.zhuravlev@intel.com&amp;gt;
Date:   Mon Jan 18 09:24:19 2016 +0300

    LU-6838 llog: limit file size of plain logs
    
    on small filesystems plain log can grow dramatically. especially
    given large record sizes produced by DNE and extended chunksize.
    I saw &amp;gt;50% of space consumed by a single llog file which was still
    in use. this leads to test failures (sanityn, etc).
    the patch introduces additional limit on plain llog size, which
    is calculated as &amp;lt;free space&amp;gt;/64 (128MB at most) at llog creation
    time.
    
    Change-Id: I0eab8177d4e416a32a6aab56d47e4142c81d13de
    Signed-off-by: Alex Zhuravlev &amp;lt;alexey.zhuravlev@intel.com&amp;gt;
    Reviewed-on: https://review.whamcloud.com/18028
    Tested-by: Jenkins
    Reviewed-by: Andreas Dilger &amp;lt;andreas.dilger@intel.com&amp;gt;
    Tested-by: Maloo &amp;lt;hpdd-maloo@intel.com&amp;gt;
    Reviewed-by: wangdi &amp;lt;di.wang@intel.com&amp;gt;
    Reviewed-by: Mike Pershin &amp;lt;mike.pershin@intel.com&amp;gt;
    Reviewed-by: Oleg Drokin &amp;lt;oleg.drokin@intel.com&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;And thus, i believe you get so small plain LLOGs due to the very little size of your MDT device created by llmount.sh, the number of entries varying due to the different/variable sizes of the different ChangeLog records being recorded.&lt;/p&gt;
</comment>
                            <comment id="192986" author="aboyko" created="Fri, 21 Apr 2017 09:44:39 +0000"  >&lt;p&gt;Bruno Faccini thanks for clarification, you are right. But commit msg doesn`t fit with code calculation. It seems that we need 8,2GB free space to skip 2MB limit of plain log.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;the patch introduces additional limit on plain llog size, which is calculated as &amp;lt;free space&amp;gt;/64 (128MB at most) at llog creation time.&lt;/p&gt;&lt;/blockquote&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;        loghandle-&amp;gt;lgh_max_size = 2 &amp;lt;&amp;lt; 20;
        dt = lu2dt_dev(cathandle-&amp;gt;lgh_obj-&amp;gt;do_lu.lo_dev);                             
        rc = dt_statfs(env, dt, &amp;amp;lgi-&amp;gt;lgi_statfs);                                    
        if (rc == 0 &amp;amp;&amp;amp; lgi-&amp;gt;lgi_statfs.os_bfree &amp;gt; 0) {
                __u64 freespace = (lgi-&amp;gt;lgi_statfs.os_bfree *                         
                                  lgi-&amp;gt;lgi_statfs.os_bsize) &amp;gt;&amp;gt; 6;                     
                if (freespace &amp;lt; loghandle-&amp;gt;lgh_max_size)                              
                        loghandle-&amp;gt;lgh_max_size = freespace;                          
                /* shouldn&apos;t be &amp;gt; 128MB in any case?                                  
                 * it&apos;s 256K records of 512 bytes each */                             
                if (freespace &amp;gt; (128 &amp;lt;&amp;lt; 20))
                        loghandle-&amp;gt;lgh_max_size = 128 &amp;lt;&amp;lt; 20;
        } 


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                    </comments>
                    <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|hzzarj:</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>