<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:58:34 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-6247] osd-zfs: sanity-sec test_16, test_22: 27919 != 26845 + 1M after write</title>
                <link>https://jira.whamcloud.com/browse/LU-6247</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;This issue was created by maloo for Isaac Huang &amp;lt;he.huang@intel.com&amp;gt;&lt;/p&gt;

&lt;p&gt;This issue relates to the following test suite run: &lt;a href=&quot;https://testing.hpdd.intel.com/test_sets/f61d2cb6-b2a2-11e4-a8f5-5254006e85c2&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://testing.hpdd.intel.com/test_sets/f61d2cb6-b2a2-11e4-a8f5-5254006e85c2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The sub-test test_22 failed with the following 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;27919 != 26845 + 1M after write
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;It seemed that the test was using 4096 as blocksize for the ZFS OST to estimate quota, which would fail.&lt;/p&gt;

&lt;p&gt;On the client:&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@eagle-44vm2 ~]# cat /proc/fs/lustre/osc/lustre-OST0000-osc-ffff88007a5bb800/import
import:
    name: lustre-OST0000-osc-ffff88007a5bb800
    target: lustre-OST0000_UUID
    state: FULL
    connect_flags: [ write_grant, server_lock, version, request_portal, truncate_lock, max_byte_per_rpc, early_lock_cancel, adaptive_timeouts, lru_resize, alt_checksum_algorithm, fid_is_enabled, version_recovery, full20, layout_lock, 64bithash, object_max_bytes, jobstats, einprogress, lvb_type, lfsck ]
    connect_data:
       flags: 0x404af0e3440478
       instance: 1
       target_version: 2.6.94.0
       initial_grant: 1048576
       max_brw_size: 4194304
       grant_block_size: 0
       grant_inode_size: 0
       grant_extent_overhead: 0
       cksum_types: 0x2
       max_easize: 32768
       max_object_bytes: 9223372036854775807
    import_flags: [ replayable, pingable, connect_tried ]
    connection:
       failover_nids: [ 10.100.4.126@tcp ]
       current_connection: 10.100.4.126@tcp
       connection_attempts: 1
       generation: 1
       in-progress_invalidations: 0
    rpcs:
       inflight: 0
       unregistering: 0
       timeouts: 0
       avg_waittime: 1702 usec
    service_estimates:
       services: 1 sec
       network: 1 sec
    transactions:
       last_replay: 0
       peer_committed: 0
       last_checked: 0
[root@eagle-44vm2 ~]# lctl get_param -n osc.lustre-OST0000-*.blocksize
4096
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;On the OSS:&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@eagle-44vm1 lustre]# cat /proc/fs/lustre/osd-zfs/lustre-OST0000/blocksize 
131072
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This seems to be the code that resets blocksize to 4K&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;int ofd_statfs(const struct lu_env *env,  struct obd_export *exp,
......
        if (obd-&amp;gt;obd_self_export != exp &amp;amp;&amp;amp; ofd_grant_compat(exp, ofd)) {
                /* clients which don&apos;t support OBD_CONNECT_GRANT_PARAM
                 * should not see a block size &amp;gt; page size, otherwise
                 * cl_lost_grant goes mad. Therefore, we emulate a 4KB (=2^12)
                 * block size which is the biggest block size known to work
                 * with all client&apos;s page size. */
                osfs-&amp;gt;os_blocks &amp;lt;&amp;lt;= ofd-&amp;gt;ofd_blockbits - COMPAT_BSIZE_SHIFT;
                osfs-&amp;gt;os_bfree  &amp;lt;&amp;lt;= ofd-&amp;gt;ofd_blockbits - COMPAT_BSIZE_SHIFT;
                osfs-&amp;gt;os_bavail &amp;lt;&amp;lt;= ofd-&amp;gt;ofd_blockbits - COMPAT_BSIZE_SHIFT;
                osfs-&amp;gt;os_bsize    = 1 &amp;lt;&amp;lt; COMPAT_BSIZE_SHIFT;
        }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I&apos;m not familiar with the code, but if the code is correct then the test should be fixed or skipped for ZFS OSTs.&lt;/p&gt;</description>
                <environment></environment>
        <key id="28706">LU-6247</key>
            <summary>osd-zfs: sanity-sec test_16, test_22: 27919 != 26845 + 1M after write</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="utopiabound">Nathaniel Clark</assignee>
                                    <reporter username="maloo">Maloo</reporter>
                        <labels>
                            <label>patch</label>
                    </labels>
                <created>Sat, 14 Feb 2015 01:19:45 +0000</created>
                <updated>Tue, 18 Aug 2015 14:14:19 +0000</updated>
                            <resolved>Mon, 30 Mar 2015 12:42:51 +0000</resolved>
                                    <version>Lustre 2.7.0</version>
                                    <fixVersion>Lustre 2.8.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="107167" author="adilger" created="Tue, 17 Feb 2015 20:02:04 +0000"  >&lt;p&gt;It looks like test_22 a new test added for nodemap in 2.7, and this has been failing intermittently in testing on both ldiskfs and zfs.  The test is checking that writing 1MB of data causes exactly 1MB of increase in quota usage for the specified (mapped) UID.&lt;/p&gt;

&lt;p&gt;It appears that this is causing 1074 * 1024 bytes of quota to be consumed in this case, 50KB more than expected (between 32-70KB in other failures), almost certainly due to indirect blocks.  It seems that the test is &lt;em&gt;trying&lt;/em&gt; to give some margin for error, but I don&apos;t think it is quite right, or large enough:&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;do_fops_quota_test() {
        # define fuzz as 2x ost block size in K
        local quota_fuzz=$(($(lctl get_param -n \
                osc.$FSNAME-OST0000-*.blocksize | head -1) / 512))
        local qused_orig=$(nodemap_check_quota &quot;$run_u&quot;)
        local qused_low=$((qused_orig - quota_fuzz))
        local qused_high=$((qused_orig + quota_fuzz))
        $run_u dd if=/dev/zero of=$testfile bs=1M count=1 &amp;gt;&amp;amp; /dev/null
        sync; sync_all_data || true

        local qused_new=$(nodemap_check_quota &quot;$run_u&quot;)
        [ $((qused_low + 1024)) -le $((qused_new)) \
                -a $((qused_high + 1024)) -ge $((qused_new)) ] ||
                error &quot;$qused_new != $qused_orig + 1M after write&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;I think the check as written is a bit confusing (i.e. inverted logic from what I&apos;d expect), and should also consider indirect blocks and other minor overhead:&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;        # allow 128KB margin for indirect blocks and other overhead
        [ $qused_new -lt $((qused_low + 1024))  \
                -o $qused_new -gt $((qused_high + 1024 + 128)) ] &amp;amp;&amp;amp;
                error &quot;$qused_new != $qused_orig + 1M after write&quot;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;The other related problem is that once this test fails, it doesn&apos;t clean up after itself properly, and the following tests up to test_23 will also fail with &quot;adding fops nodemaps failed 1&quot;.  The tests should add a trap for a cleanup helper so that the later tests can run properly.&lt;/p&gt;</comment>
                            <comment id="107562" author="kit.westneat" created="Fri, 20 Feb 2015 22:50:05 +0000"  >&lt;p&gt;I looked on maloo for test failures on ldiskfs with this cause, but I couldn&apos;t find any. It looks like all the sanity-sec failures on ldiskfs are &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-5423&quot; title=&quot;Test failure sanity-sec test_4: setgroups (2)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-5423&quot;&gt;&lt;del&gt;LU-5423&lt;/del&gt;&lt;/a&gt; or &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6106&quot; title=&quot;Interop 2.6.0&amp;lt;-&amp;gt;2.7 sanity-sec test_16: adding fops nodemaps failed 1&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6106&quot;&gt;&lt;del&gt;LU-6106&lt;/del&gt;&lt;/a&gt;. Do you think it&apos;s worth trying to just modify the fuzz on ZFS? I think on one of the OpenSFS calls that&apos;s what we decided to do, but it looks like I used the wrong blocksize parameter (osc.$FSNAME-OST0000-&amp;#42;.blocksize vs osd-&amp;#42;.$FSNAME-OST0000.blocksize).&lt;/p&gt;

&lt;p&gt;I can invert the check if you prefer it that way. The fuzz parameters were actually added to account for the indirect blocks and overhead. I have it fuzz the low and high, but I suppose it really only makes sense to fuzz if the quota is higher than expected. If the quota used is lower than expected, it can&apos;t really be accounted for as filesystem overhead, right? If that&apos;s the case, I can just remove the qused_low parameter, as it seems like it&apos;s confusing.&lt;/p&gt;</comment>
                            <comment id="107610" author="adilger" created="Sat, 21 Feb 2015 22:56:45 +0000"  >&lt;p&gt;The lower fuzz doesn&apos;t make sense for ldiskfs, though in theory it might make sense for ZFS if it has block compression enabled, but we don&apos;t do that now, so may as well remove it. I though I saw ldiskfs test failures when I was looking, but I can&apos;t check right now. &lt;/p&gt;

&lt;p&gt;I didn&apos;t check yet what the ZFS OSTs return for the blocksize. It may be 128KB now, and up to 1MB in the future. &lt;/p&gt;

&lt;p&gt;As for the /proc filename, the OSC one should be ok on the client,but it may be that this was removed by John H. recently?  Definitely the osd one will work on the server. &lt;/p&gt;</comment>
                            <comment id="107687" author="gerrit" created="Mon, 23 Feb 2015 20:27:16 +0000"  >&lt;p&gt;Kit Westneat (kit.westneat@gmail.com) uploaded a new patch: &lt;a href=&quot;http://review.whamcloud.com/13844&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/13844&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6247&quot; title=&quot;osd-zfs: sanity-sec test_16, test_22: 27919 != 26845 + 1M after write&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6247&quot;&gt;&lt;del&gt;LU-6247&lt;/del&gt;&lt;/a&gt; tests: fix nodemap quota test to use correct blocksize&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 525c3d8143acd5d1cd2612a858ba9f872792e0d4&lt;/p&gt;</comment>
                            <comment id="107770" author="kit.westneat" created="Tue, 24 Feb 2015 15:39:00 +0000"  >&lt;p&gt;It looks like there was an issue with quota reclaiming in the last test - the root user was unable to reclaim 2k (reclaimed 1022k vs the 1024k expected). &lt;/p&gt;

&lt;p&gt;For ldiskfs, it seems like this might happen if the directory record needed to be expanded due to the number of deleted dentries. Or do directory records ever reclaim deleted dentries? Do you have any thoughts as to why this might happen for ZFS?&lt;/p&gt;

&lt;p&gt;What do you think about having a 4k lower fuzz?&lt;/p&gt;</comment>
                            <comment id="107873" author="adilger" created="Wed, 25 Feb 2015 01:39:13 +0000"  >&lt;p&gt;Definitely there is a need for fuzz in all space accoubting tests. There are Lustre LLOG records written, object index, and other files that are not freed when a file is deleted. As long as the test file is large enough that we can be certain the remaining space is fuzz and not the file failing to be deleted (I think the current test is ok in this regard) then the accounting doesn&apos;t need to be totally accurate.&lt;/p&gt;

&lt;p&gt;In fact, some tests are having a fuzz much larger than a single block. It might make sense to have an &quot;official fuzz&quot; for each backend, or helper routines to check if a value is within the limits instead of reinventing this for every test that is checking space limits. Not sure if there is something in sanity-quota.sh in this regard already or not, but if yes then it probably makes sense to use them. &lt;/p&gt;</comment>
                            <comment id="107891" author="isaac" created="Wed, 25 Feb 2015 05:20:41 +0000"  >&lt;p&gt;There&apos;s a fs_log_size() in test-framework.sh.&lt;/p&gt;</comment>
                            <comment id="110848" author="gerrit" created="Fri, 27 Mar 2015 15:29:35 +0000"  >&lt;p&gt;Oleg Drokin (oleg.drokin@intel.com) merged in patch &lt;a href=&quot;http://review.whamcloud.com/13844/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/13844/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-6247&quot; title=&quot;osd-zfs: sanity-sec test_16, test_22: 27919 != 26845 + 1M after write&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-6247&quot;&gt;&lt;del&gt;LU-6247&lt;/del&gt;&lt;/a&gt; tests: fix nodemap quota test to use correct blocksize&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 0233e76f3f9830210ba7012554ee7cfc41e3ab37&lt;/p&gt;</comment>
                            <comment id="110990" author="utopiabound" created="Mon, 30 Mar 2015 12:42:51 +0000"  >&lt;p&gt;Patch landed to master&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                                        </outwardlinks>
                                                        </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|hzx6dj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>17497</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>