From: Theodore Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org, Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH 05/11] ext4: Fixup free space calculations when expanding inodes
Date: Thu, 11 Aug 2016 13:33:09 -0400 [thread overview]
Message-ID: <20160811173309.GE10626@thunk.org> (raw)
In-Reply-To: <1470220795-17045-6-git-send-email-jack@suse.cz>
On Wed, Aug 03, 2016 at 12:39:49PM +0200, Jan Kara wrote:
> Conditions checking whether there is enough free space in an xattr block
> and when xattr is large enough to make enough space in the inode forgot
> to account for the fact that inode need not be completely filled up with
> xattrs. Thus we could move unnecessarily many xattrs out of inode or
> even falsely claim there is not enough space to expand the inode. We
> also forgot to update the amount of free space in xattr block when moving
> more xattrs and thus could decide to move too big xattr resulting in
> unexpected failure.
>
> Fix these problems by properly updating free space in the inode and
> xattr block as we move xattrs. To simplify the math, avoid shifting
> xattrs after removing each one xattr and instead just shift xattrs only
> once there is enough free space in the inode.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
Thanks, applied.
- Ted
next prev parent reply other threads:[~2016-08-11 17:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-03 10:39 [PATCH 0/11] ext4: Fix inode expansion code Jan Kara
2016-08-03 10:39 ` [PATCH 01/11] ext4: Fix xattr shifting when expanding inodes Jan Kara
2016-08-03 23:25 ` Andreas Dilger
2016-08-04 8:43 ` Jan Kara
2016-08-11 17:32 ` Theodore Ts'o
2016-08-03 10:39 ` [PATCH 02/11] ext4: Fix xattr shifting when expanding inodes (2) Jan Kara
2016-08-11 17:32 ` Theodore Ts'o
2016-08-03 10:39 ` [PATCH 03/11] ext4: Properly align shifted xattrs when expanding inodes Jan Kara
2016-08-11 17:32 ` Theodore Ts'o
2016-08-03 10:39 ` [PATCH 04/11] ext4: Avoid deadlock when expanding inode size Jan Kara
2016-08-11 17:32 ` Theodore Ts'o
2016-08-03 10:39 ` [PATCH 05/11] ext4: Fixup free space calculations when expanding inodes Jan Kara
2016-08-11 17:33 ` Theodore Ts'o [this message]
2016-08-03 10:39 ` [PATCH 06/11] ext4: Check that external xattr value block is 0 Jan Kara
2016-08-11 17:33 ` Theodore Ts'o
2016-08-03 10:39 ` [PATCH 07/11] ext4: Remove checks for e_value_block Jan Kara
2016-08-11 17:33 ` Theodore Ts'o
2016-08-03 10:39 ` [PATCH 08/11] ext4: Replace bogus assertion in ext4_xattr_shift_entries() Jan Kara
2016-08-11 17:33 ` Theodore Ts'o
2016-08-03 10:39 ` [PATCH 09/11] ext4: Factor out xattr moving Jan Kara
2016-08-11 17:33 ` Theodore Ts'o
2016-08-03 10:39 ` [PATCH 10/11] ext4: Remove (almost) unused variables from ext4_expand_extra_isize_ea() Jan Kara
2016-08-11 17:34 ` Theodore Ts'o
2016-08-03 10:39 ` [PATCH 11/11] ext4: Factor out loop for freeing inode xattr space Jan Kara
2016-08-11 17:34 ` Theodore Ts'o
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=20160811173309.GE10626@thunk.org \
--to=tytso@mit.edu \
--cc=david@fromorbit.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.