<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:42:13 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-4382] kernel BUG at fs/jbd2/transaction.c:1033</title>
                <link>https://jira.whamcloud.com/browse/LU-4382</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Running lustre &lt;a href=&quot;https://github.com/chaos/lustre/commits/2.4.0-19chaos&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;2.4.0-19chaos&lt;/a&gt; we recently had several OSS nodes crass on the following BUG:&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;kernel BUG at fs/jbd2/transaction.c:1033&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;They were all in an ll_ost_00_0?? thread with the same backtrace:&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;__ldiskfs_handle_dirty_metadata
ldiskfs_free_inode
ldiskfs_delete_inode
generic_delete_inode
generic_drop_inode
iput
osd_object_delete
lu_object_free
lu_object_put
ofd_object_put
ofd_destroy_by_fid
ofd_destroy
ofd_destroy
ost_handle
ptlrpc_server_handle_request
ptlrpc_main
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The failures were on the secure network, so I can&apos;t upload logs.&lt;/p&gt;</description>
                <environment></environment>
        <key id="22452">LU-4382</key>
            <summary>kernel BUG at fs/jbd2/transaction.c:1033</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.whamcloud.com/images/icons/priorities/blocker.svg">Blocker</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="bobijam">Zhenyu Xu</assignee>
                                    <reporter username="morrone">Christopher Morrone</reporter>
                        <labels>
                            <label>mn4</label>
                    </labels>
                <created>Fri, 13 Dec 2013 02:33:44 +0000</created>
                <updated>Wed, 27 Aug 2014 17:27:42 +0000</updated>
                            <resolved>Mon, 24 Feb 2014 22:05:00 +0000</resolved>
                                    <version>Lustre 2.4.1</version>
                                    <fixVersion>Lustre 2.6.0</fixVersion>
                    <fixVersion>Lustre 2.5.1</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>10</watches>
                                                                            <comments>
                            <comment id="73442" author="pjones" created="Fri, 13 Dec 2013 04:00:35 +0000"  >&lt;p&gt;Bobijam&lt;/p&gt;

&lt;p&gt;Could you please help with this one?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="73603" author="morrone" created="Mon, 16 Dec 2013 18:24:21 +0000"  >&lt;p&gt;We had several more OSS nodes crash on this bug.&lt;/p&gt;</comment>
                            <comment id="73633" author="bobijam" created="Mon, 16 Dec 2013 23:43:10 +0000"  >&lt;p&gt;it looks like the kernel stack is overflow but w/o further logs I could not know what code path took so much stack space.&lt;/p&gt;</comment>
                            <comment id="73638" author="morrone" created="Tue, 17 Dec 2013 00:57:20 +0000"  >&lt;p&gt;Could you elaborate on why you suspect a stack overflow?  Just to make sure that we are on the same page, we are hitting the following J_ASSERT_JH in jbd2_journal_dirty_metadata():&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;  1026          if (jh-&amp;gt;b_modified == 0) {
  1027                  /*
  1028                   * This buffer&apos;s got modified and becoming part
  1029                   * of the transaction. This needs to be done
  1030                   * once a transaction -bzzz
  1031                   */
  1032                  jh-&amp;gt;b_modified = 1;
  1033                  J_ASSERT_JH(jh, handle-&amp;gt;h_buffer_credits &amp;gt; 0);
  1034                  handle-&amp;gt;h_buffer_credits--;
  1035          }
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
</comment>
                            <comment id="73639" author="bobijam" created="Tue, 17 Dec 2013 01:28:13 +0000"  >&lt;p&gt;sorry, I meant journal credit deficiency.&lt;/p&gt;</comment>
                            <comment id="73667" author="bobijam" created="Tue, 17 Dec 2013 11:38:27 +0000"  >&lt;p&gt;what condition is this hit? Client deleting files or OSS in recovery process.&lt;/p&gt;

&lt;p&gt;From the backtrace, it&apos;s in the ext4(ldiskfs) context which does not preserve enough credit for the inode delete operation.&lt;/p&gt;</comment>
                            <comment id="73668" author="bobijam" created="Tue, 17 Dec 2013 11:59:16 +0000"  >&lt;p&gt;Is it possible that the OSS nodes do not have big enough journal devices for the bursting data change? &lt;/p&gt;</comment>
                            <comment id="73705" author="morrone" created="Tue, 17 Dec 2013 19:20:53 +0000"  >&lt;blockquote&gt;&lt;p&gt;what condition is this hit? Client deleting files or OSS in recovery process.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;I don&apos;t see any signs of recovery in the console logs.  The assertion trips with nothing else in the log for more than an hour preceding it.&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Is it possible that the OSS nodes do not have big enough journal devices for the bursting data change?&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;We are not using external journal devices.  The OSS nodes have 15 OSTs, each device is aroun 3.3TB in size and around 80% full.&lt;/p&gt;</comment>
                            <comment id="73875" author="morrone" created="Thu, 19 Dec 2013 18:53:39 +0000"  >&lt;p&gt;OSS crashes are pretty frequent (every couple of days).  We definitely need a plan to get this debugged.&lt;/p&gt;</comment>
                            <comment id="74005" author="bobijam" created="Mon, 23 Dec 2013 01:32:06 +0000"  >&lt;p&gt;Hi bzzz,&lt;/p&gt;

&lt;p&gt;Can you enlighten me how to debug this transaction credit deficiency issue?&lt;/p&gt;</comment>
                            <comment id="74007" author="bzzz" created="Mon, 23 Dec 2013 03:36:09 +0000"  >&lt;p&gt;I think Lustre isn&apos;t involved in this case - our transaction was closed in ofd_object_destroy() and later iput() was called on the inode.&lt;br/&gt;
in ldiskfs_delete_inode():&lt;br/&gt;
...&lt;br/&gt;
	if (!ldiskfs_handle_has_enough_credits(handle, 3)) {&lt;br/&gt;
		err = ldiskfs_journal_extend(handle, 3);&lt;/p&gt;

&lt;p&gt;3 doesn&apos;t seem to be enough to remove inode from orphan list, free inode and adjust quota accounting ?&lt;/p&gt;</comment>
                            <comment id="74981" author="bobijam" created="Wed, 15 Jan 2014 03:25:37 +0000"  >&lt;p&gt;Hi Alex,&lt;/p&gt;

&lt;p&gt;I checked the difference of ldiskfs code and vanilla code, in ldiskfs_free_inode()-&amp;gt;ldiskfs_xattr_delete_inode(), we added delete_external_ea part which vanilla code does not contain, is it possible that we omitted count in the external EA inode unlink credit?&lt;/p&gt;</comment>
                            <comment id="75088" author="bobijam" created="Thu, 16 Jan 2014 15:51:21 +0000"  >&lt;p&gt;master patch tracking at &lt;a href=&quot;http://review.whamcloud.com/8881&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/8881&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="75226" author="morrone" created="Fri, 17 Jan 2014 22:16:06 +0000"  >&lt;p&gt;OSTs are dropping like flies around here lately.&lt;/p&gt;

&lt;p&gt;Since you have a theory now, is there perhaps a systemtap script or debugging patch that could be used to verify your theory?  It would be reassuring to know that we are making progress on the right bug.&lt;/p&gt;</comment>
                            <comment id="75246" author="adilger" created="Sat, 18 Jan 2014 18:45:09 +0000"  >&lt;p&gt;The xattr_inode (large_xattr) feature shouldn&apos;t ever be used on an OST, so I don&apos;t think this can be the problem. That should only be used if there is an xattr larger than 4KB on the OST object, but we never store user xattrs or large layouts on the OST objects. The only xattrs we store there are the LMA (struct lov_mds_md) and fid (struct filter_fid) which should both fit in under 128 bytes. &lt;/p&gt;

&lt;p&gt;I would be more inclined to blame the truncate code, since this has traditionally been a source of problems because the size of a truncate transaction is potentially very large.&lt;/p&gt;

&lt;p&gt;Are quotas enabled on your filesystem (even just space accounting without enforcement)?  Are the objects being unlinked particularly large?&lt;/p&gt;</comment>
                            <comment id="75366" author="morrone" created="Tue, 21 Jan 2014 18:37:26 +0000"  >&lt;p&gt;Yes quota accounting is enabled.  It is always enabled in 2.4+, correct?&lt;/p&gt;

&lt;p&gt;I have no idea how large the objects might be.  Some may certainly be large, for some definition of large.&lt;/p&gt;
</comment>
                            <comment id="75407" author="bobijam" created="Wed, 22 Jan 2014 02:46:20 +0000"  >&lt;p&gt;Alex,&lt;/p&gt;

&lt;p&gt;in ext4_free_inode()&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;        /*
         * Note: we must free any quota before locking the superblock,
         * as writing the quota to disk may need the lock as well.
         */
        vfs_dq_init(inode);
        ext4_xattr_delete_inode(handle, inode);
        vfs_dq_free_inode(inode);
        vfs_dq_drop(inode);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and vfs_dp_init() comment states&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;/* It is better to call &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; function outside of any transaction as it might
 * need a lot of space in journal &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; dquot structure allocation. */
&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; inline void vfs_dq_init(struct inode *inode)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Is it possible that kernel code has not counted in the quota credit to be included in the 3 block credit?&lt;/p&gt;</comment>
                            <comment id="75408" author="bobijam" created="Wed, 22 Jan 2014 02:51:43 +0000"  >&lt;p&gt;about truncate part, since truncate has happened before calculating remaining credit for inode free, so I&apos;d think that truncate credit is contained safely.&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;        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (inode-&amp;gt;i_blocks)
                ext4_truncate(inode);

        /*
         * ext4_ext_truncate() doesn&apos;t reserve any slop when it
         * restarts journal transactions; therefore there may not be
         * enough credits left in the handle to remove the inode from
         * the orphan list and set the dtime field.
         */
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!ext4_handle_has_enough_credits(handle, 3)) {
                err = ext4_journal_extend(handle, 3);
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (err &amp;gt; 0)
                        err = ext4_journal_restart(handle, 3);
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (err != 0) {
                        ext4_warning(inode-&amp;gt;i_sb,
                                     &lt;span class=&quot;code-quote&quot;&gt;&quot;couldn&apos;t extend journal (err %d)&quot;&lt;/span&gt;, err);
                stop_handle:
                        ext4_journal_stop(handle);
                        sb_end_intwrite(inode-&amp;gt;i_sb);
                        &lt;span class=&quot;code-keyword&quot;&gt;goto&lt;/span&gt; no_delete;
                }
        }

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="75673" author="bzzz" created="Mon, 27 Jan 2014 14:36:19 +0000"  >&lt;p&gt;iirc, to free an inode, we have to modify the following blocks: inode itself (dtime), orphan list header (sb), inode bitmap, group descriptor, then user accounting and group accounting = 6 blocks? and, iirc, we changed quota accounting to be atomic (so a part of transaction).&lt;/p&gt;</comment>
                            <comment id="76276" author="bfaccini" created="Wed, 5 Feb 2014 17:00:17 +0000"  >&lt;p&gt;Chris,&lt;br/&gt;
Since it ends in a BUG(), is it possible that before to restart Lustre on the crashed OSS node you do some crash analysis to find concerned inode number and then extract its content using debugfs ?&lt;br/&gt;
I would like to ensure that the issue is realy the xattr need for additional credits.&lt;/p&gt;</comment>
                            <comment id="76278" author="bzzz" created="Wed, 5 Feb 2014 17:03:33 +0000"  >&lt;p&gt;I&apos;m not sure why xattr is mentioned while 3 doesn&apos;t look enough with no xattrs even.&lt;/p&gt;</comment>
                            <comment id="76362" author="bfaccini" created="Thu, 6 Feb 2014 17:34:23 +0000"  >&lt;p&gt;Ok Alex, thanks to insist &#8230; I had to better read the full ticket&apos;s story. Talking with Johann it is also more clear for me what could be the specific scenario leading to this issue. Will try to post a patch proposal to ensure better computation of required credits, that will take care of quota-accounting if used and all the other blocks you mentionned.&lt;/p&gt;

&lt;p&gt;Chris, forget about my earlier requests of debugfs infos to determine xattr credits need, that do not apply (actually?) on OSSs.&lt;/p&gt;</comment>
                            <comment id="76524" author="green" created="Sat, 8 Feb 2014 00:38:02 +0000"  >&lt;p&gt;It would be a great exercise for somebody other than Alex to go through this callpath and count all possible blocks being journaled, list them all here for double verification and thus arrive to the updated reservation number.&lt;/p&gt;</comment>
                            <comment id="76538" author="bobijam" created="Sat, 8 Feb 2014 04:50:54 +0000"  >&lt;p&gt;ext4_delete_inode()-&amp;gt; ext4_free_inode(handle, inode)&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;        vfs_dq_init(inode);
        ext4_xattr_delete_inode(handle, inode);
        vfs_dq_free_inode(inode);
        vfs_dq_drop(inode);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;in vfs_dq_init()-&amp;gt;ext4_dquot_initialize() (which is added in ldiskfs ext4-back-dquot-to patch)&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;ext4_dquot_initialize&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ext4_dquot_initialize(struct inode *inode, &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; type)
{       
        handle_t *handle;
        &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ret, err;
        
        &lt;span class=&quot;code-comment&quot;&gt;/* We may create quota structure so we need to reserve enough blocks */&lt;/span&gt;
        handle = ext4_journal_start(inode, 2*EXT4_QUOTA_INIT_BLOCKS(inode-&amp;gt;i_sb));                     
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (IS_ERR(handle))
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; PTR_ERR(handle);
        ret = dquot_initialize(inode, type);
        err = ext4_journal_stop(handle);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!ret)      
                ret = err;
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; ret;     
}       
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;in vfs_dq_free_inode()&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;        &lt;span class=&quot;code-comment&quot;&gt;/* Dirtify all the dquots - &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; can block when journalling */&lt;/span&gt;
        &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; (cnt = 0; cnt &amp;lt; MAXQUOTAS; cnt++)
                &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (dquot[cnt])
                        mark_dquot_dirty(dquot[cnt]);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;and mark_dquot_dirty()-&amp;gt;ext4_write_dquot()&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;ext4_write_dquot&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ext4_write_dquot(struct dquot *dquot)
{
        &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ret, err;
        handle_t *handle;
        struct inode *inode;

        inode = dquot_to_inode(dquot);
        handle = ext4_journal_start(inode,
                                    EXT4_QUOTA_TRANS_BLOCKS(dquot-&amp;gt;dq_sb));
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (IS_ERR(handle))
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; PTR_ERR(handle);
        ret = dquot_commit(dquot);
        err = ext4_journal_stop(handle);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!ret)
                ret = err;
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; ret;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;and vfs_dq_drop()-&amp;gt;ext4_dquot_drop()&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;&quot;&gt;&lt;b&gt;ext4_dquot_drop&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;        handle_t *handle;
        &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; ret, err;
        
        &lt;span class=&quot;code-comment&quot;&gt;/* We may delete quota structure so we need to reserve enough blocks */&lt;/span&gt;
        handle = ext4_journal_start(inode, 2*EXT4_QUOTA_DEL_BLOCKS(inode-&amp;gt;i_sb));       
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (IS_ERR(handle)) {
                /*
                 * We call dquot_drop() anyway to at least release references
                 * to quota structures so that umount does not hang.
                 */
                dquot_drop(inode);
                &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; PTR_ERR(handle);
        }
        ret = dquot_drop(inode);
        err = ext4_journal_stop(handle);
        &lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; (!ret)
                ret = err;
        &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; ret;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;so for quota part, ext4_free_inode may misses 2*EXT4_QUOTA_INIT_BLOCKS(inode-&amp;gt;i_sb) + 2*2 + 2*EXT4_QUOTA_DEL_BLOCKS(inode-&amp;gt;i_sb) credits.&lt;/p&gt;</comment>
                            <comment id="76542" author="bobijam" created="Sat, 8 Feb 2014 07:29:49 +0000"  >&lt;p&gt;the patch to verify the quota missed credit theory &lt;a href=&quot;http://review.whamcloud.com/9187&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9187&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="76548" author="adilger" created="Sun, 9 Feb 2014 02:36:25 +0000"  >&lt;p&gt;I don&apos;t think ext4_free_inode() needs to account for EXT4_QUOTA_INIT_BLOCK() because the user and group should already have quota allocated at wrote or chown time. I don&apos;t think it is possible to delete a file that has not already accounted in the quota. &lt;/p&gt;</comment>
                            <comment id="76549" author="bobijam" created="Sun, 9 Feb 2014 02:55:28 +0000"  >&lt;p&gt;yes, I think you are right about the unnecessariness of the dquot initial credit counting.&lt;/p&gt;

&lt;p&gt;And further more, I checked dquot_drop()-&amp;gt;dqput(), if the dquot drop need to release the quota structure, its operations also involves writing the dquot back to disk, so probably 2*EXT4_QUOTA_DEL_BLOCKS is enough for the whole quota operations.&lt;/p&gt;</comment>
                            <comment id="76574" author="bfaccini" created="Mon, 10 Feb 2014 10:00:56 +0000"  >&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;I find this global credits need evaluation very difficult to compute, regarding the number of nested handles/needs in underlying
routines called and also depending on the current operation to be processed &#8230;
So, I can understand why the 2*EXT4_QUOTA_INIT_BLOCK() credits need in vfs_dq_init()&amp;gt;ext4_dquot_initialize()-&amp;gt;dquot_initialize()
could be ignored since it will not be used during a truncate, but then why do we also ignore the
MAXQUOTAS*EXT4_QUOTA_TRANS_BLOCKS() (2*2 ?) for 
vfs_dq_free_inode()-&amp;gt;mark_dquot_dirty()-&amp;gt;ext4_write_dquot()-&amp;gt;dquot_commit() ?

And also, if the 1st reservation has been almost precise with this evaluation but more credits are required in 
ext4_delete_inode(), why do we need to extend with the same number ?
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="76575" author="bzzz" created="Mon, 10 Feb 2014 10:10:55 +0000"  >&lt;p&gt;&amp;gt; And also, if the 1st reservation has been almost precise with this evaluation but more credits are required in &lt;br/&gt;
ext4_delete_inode(), why do we need to extend with the same number ?&lt;/p&gt;

&lt;p&gt;because in some cases truncate can&apos;t fit a single transaction (this is true for other filesystems like ZFS as well), then it&apos;s hard to compute credits for truncate as it involves tree traversal (so we&apos;d have to traverse twice).&lt;/p&gt;

&lt;p&gt;one way to &quot;compute&quot; is to extend handle_t with another counter and increment it in __ldiskfs_handle_dirty_metadata() or maintain some history. this way you can learn what code is involved, at least.&lt;/p&gt;</comment>
                            <comment id="77316" author="bobijam" created="Wed, 19 Feb 2014 01:18:30 +0000"  >&lt;p&gt;Since OST does not use xattr inode, I&apos;ve created another ticket for it (&lt;a href=&quot;https://jira.whamcloud.com/browse/LU-4648&quot; title=&quot;inode deletion transaction does not count large EA inode deletion credits&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-4648&quot;&gt;&lt;del&gt;LU-4648&lt;/del&gt;&lt;/a&gt;).&lt;/p&gt;</comment>
                            <comment id="77550" author="bogl" created="Thu, 20 Feb 2014 23:12:10 +0000"  >&lt;p&gt;backport to b2_5:&lt;br/&gt;
&lt;a href=&quot;http://review.whamcloud.com/9334&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/9334&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="77759" author="pjones" created="Mon, 24 Feb 2014 22:05:01 +0000"  >&lt;p&gt;Landed for 2.6&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="25687">LU-5392</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|hzwbbr:</customfieldvalue>

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