[Ocfs2-tools-devel] [PATCH 09/12] ocfs2-tools: change maximum inline size with xattr

Tiger Yang tiger.yang at oracle.com
Tue Mar 24 19:49:55 PDT 2009


We have to change maximum data inline size if we have extended
attribues in line.

Signed-off-by: Tiger Yang <tiger.yang at oracle.com>
---
 fsck.ocfs2/pass1.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/fsck.ocfs2/pass1.c b/fsck.ocfs2/pass1.c
index fb5fd49..d80e13f 100644
--- a/fsck.ocfs2/pass1.c
+++ b/fsck.ocfs2/pass1.c
@@ -865,7 +865,13 @@ size_cluster_check:
 	 * less than the max inline data size.
 	 */
 	if (di->i_dyn_features & OCFS2_INLINE_DATA_FL) {
-		uint16_t max_inline = ocfs2_max_inline_data(fs->fs_blocksize);
+		uint16_t max_inline;
+
+		if (di->i_dyn_features & OCFS2_INLINE_XATTR_FL)
+			max_inline = ocfs2_max_inline_data(fs->fs_blocksize) -
+				     di->i_xattr_inline_size;
+		else
+			max_inline = ocfs2_max_inline_data(fs->fs_blocksize);
 
 		/* id_count is check first. */
 		if (di->id2.i_data.id_count != max_inline &&
-- 
1.5.4.1




More information about the Ocfs2-tools-devel mailing list