linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Is there any reason for us to use EXT4_MAXQUOTAS_INIT_BLOCKS?
Date: Wed, 15 Apr 2015 19:27:40 -0400	[thread overview]
Message-ID: <20150415232740.GB25331@thunk.org> (raw)
In-Reply-To: <20150415204754.GA13039@quack.suse.cz>

On Wed, Apr 15, 2015 at 10:47:54PM +0200, Jan Kara wrote:
>   Yeah, the credit estimate in ext4_symlink():
> credits = 4 + EXT4_MAXQUOTAS_INIT_BLOCKS(dir->i_sb) + EXT4_XATTR_TRANS_BLOCKS;
>   is just too pessimistic. Actually what we need for long symlinks is only
> credits for inode creation + addition to orphan list (so 4 +
> EXT4_MAXQUOTAS_TRANS_BLOCKS -- sb, gdt, bitmap, inode).

Thanks, I just wanted to check with you before I fixed this, since we
didn't have anything explicitly documenting what
EXT4_MAXQUOAS_INIT_BLOCKS did (which I'll fix as well while I'm at
it), and I didn't want to make anything assumptions that might come
back and bite us later.  Of course, the fact that ext4_symlinks was
using way more credits than ext4_mknod made it clear something was
buggy, and I couldn't imagine any circumstances why creating a long
symlink (or more correctly, only the first part of creatinga long
symlink) would require modifying 156 metadata blocks!   :-)

	       	      	       	    	       - Ted

      reply	other threads:[~2015-04-15 23:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15 15:55 Is there any reason for us to use EXT4_MAXQUOTAS_INIT_BLOCKS? Theodore Ts'o
2015-04-15 20:47 ` Jan Kara
2015-04-15 23:27   ` Theodore Ts'o [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150415232740.GB25331@thunk.org \
    --to=tytso@mit.edu \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).