]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/patches/suse-2.6.27.31/patches.suse/ocfs2-xattr-Only-extend-xattr-bucket-in-need.patch
Move xen patchset to new version's subdir.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.suse / ocfs2-xattr-Only-extend-xattr-bucket-in-need.patch
CommitLineData
00e5a55c
BS
1From: Tao Ma <tao.ma@oracle.com>
2Date: Wed, 12 Nov 2008 08:26:57 +0800
3Subject: ocfs2/xattr: Only extend xattr bucket in need.
4Patch-mainline: 2.6.29
5
6When the first block of a bucket is filled up with xattr
7entries, we normally extend the bucket. But if we are
8just replace one xattr with small length, we don't need
9to extend it. This is important since we will calculate
10what we need before the transaction and in this situation
11no resources will be allocated.
12
13Signed-off-by: Tao Ma <tao.ma@oracle.com>
14Signed-off-by: Mark Fasheh <mfasheh@suse.com>
15---
16 fs/ocfs2/xattr.c | 4 +++-
17 1 files changed, 3 insertions(+), 1 deletions(-)
18
19diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
20index d8fc714..4501c63 100644
21--- a/fs/ocfs2/xattr.c
22+++ b/fs/ocfs2/xattr.c
23@@ -4564,7 +4564,9 @@ try_again:
24 free, need, max_free, le16_to_cpu(xh->xh_free_start),
25 le16_to_cpu(xh->xh_name_value_len));
26
27- if (free < need || count == ocfs2_xattr_max_xe_in_bucket(inode->i_sb)) {
28+ if (free < need ||
29+ (xs->not_found &&
30+ count == ocfs2_xattr_max_xe_in_bucket(inode->i_sb))) {
31 if (need <= max_free &&
32 count < ocfs2_xattr_max_xe_in_bucket(inode->i_sb)) {
33 /*
34--
351.5.6
36