linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ext4:an improvement in ext4 feature inline_data
@ 2013-05-26 13:19 boxi liu
  2013-05-26 13:40 ` Tao Ma
  0 siblings, 1 reply; 3+ messages in thread
From: boxi liu @ 2013-05-26 13:19 UTC (permalink / raw)
  To: Theodore Tso; +Cc: Robin Dong, linux-ext4@vger.kernel.org, tm@tao.ma

In ext4 feature inline_data,it use the xattr's space to store the
inline data in inode.When we calculate the inline data as the xattr,we
add the pad.But in get_max_inline_xattr_value_size() function we count
the free space without pad.It cause some contents are moved to a block
even if it can be
stored in the inode.

Signed-off-by:liulei <lewis.liulei@huawei.com>
---
 fs/ext4/inline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext4/inline.c b/fs/ext4/inline.c
index c0fd1a1..87758ca 100644
--- a/fs/ext4/inline.c
+++ b/fs/ext4/inline.c
@@ -71,7 +71,7 @@ static int get_max_inline_xattr_value_size(struct
inode *inode,
                entry = (struct ext4_xattr_entry *)
                        ((void *)raw_inode + EXT4_I(inode)->i_inline_off);

-               free += le32_to_cpu(entry->e_value_size);
+               free += EXT4_XATTR_SIZE(le32_to_cpu(entry->e_value_size));
                goto out;
        }

--

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-06-18 15:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-26 13:19 [PATCH] ext4:an improvement in ext4 feature inline_data boxi liu
2013-05-26 13:40 ` Tao Ma
2013-06-18 15:21   ` Theodore Ts'o

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).