]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/ocfs2-reserve-xattr-block-for-new-directory-with-in.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / ocfs2-reserve-xattr-block-for-new-directory-with-in.patch
1 From: Tiger Yang <tiger.yang@oracle.com>
2 Date: Fri, 6 Mar 2009 10:19:30 +0800
3 Subject: [PATCH] ocfs2: reserve xattr block for new directory with inline data
4 Patch-mainline: 2.6.29
5
6 If this is a new directory with inline data, we choose to
7 reserve the entire inline area for directory contents and
8 force an external xattr block.
9
10 Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
11 Acked-by: Joel Becker <joel.becker@oracle.com>
12 Signed-off-by: Mark Fasheh <mfasheh@suse.com>
13 ---
14 fs/ocfs2/xattr.c | 4 ++++
15 1 files changed, 4 insertions(+), 0 deletions(-)
16
17 Index: linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/xattr.c
18 ===================================================================
19 --- linux-2.6.27-sle11_ocfs2_update2.orig/fs/ocfs2/xattr.c
20 +++ linux-2.6.27-sle11_ocfs2_update2/fs/ocfs2/xattr.c
21 @@ -450,8 +450,12 @@ int ocfs2_calc_xattr_init(struct inode *
22 * when blocksize = 512, may reserve one more cluser for
23 * xattr bucket, otherwise reserve one metadata block
24 * for them is ok.
25 + * If this is a new directory with inline data,
26 + * we choose to reserve the entire inline area for
27 + * directory contents and force an external xattr block.
28 */
29 if (dir->i_sb->s_blocksize == OCFS2_MIN_BLOCKSIZE ||
30 + (S_ISDIR(mode) && ocfs2_supports_inline_data(osb)) ||
31 (s_size + a_size) > OCFS2_XATTR_FREE_IN_IBODY) {
32 ret = ocfs2_reserve_new_metadata_blocks(osb, 1, xattr_ac);
33 if (ret) {