From 5251c2def55226d288013eb331e1535abf8f04e8 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 19 Jun 2002 18:41:35 +0000 Subject: [PATCH] Remove debugging from htree patch, sync with branch. --- lustre/extN/htree-ext3-2.4.18.diff | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lustre/extN/htree-ext3-2.4.18.diff b/lustre/extN/htree-ext3-2.4.18.diff index 284dc78..0579601 100644 --- a/lustre/extN/htree-ext3-2.4.18.diff +++ b/lustre/extN/htree-ext3-2.4.18.diff @@ -132,10 +132,10 @@ + +struct dx_root +{ -+ struct fake_dirent fake1; -+ char dot1[4]; -+ struct fake_dirent fake2; -+ char dot2[4]; ++ struct fake_dirent dot; ++ char dot_name[4]; ++ struct fake_dirent dotdot; ++ char dotdot_name[4]; + struct dx_root_info + { + le_u32 reserved_zero; @@ -237,13 +237,14 @@ + +static inline unsigned dx_root_limit (struct inode *dir, unsigned infosize) +{ -+ unsigned entry_space = dir->i_sb->s_blocksize - 24 - infosize; ++ unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(1) - ++ EXT3_DIR_REC_LEN(2) - infosize; + return 0? 20: entry_space / sizeof(struct dx_entry); +} + +static inline unsigned dx_node_limit (struct inode *dir) +{ -+ unsigned entry_space = dir->i_sb->s_blocksize - sizeof(struct fake_dirent); ++ unsigned entry_space = dir->i_sb->s_blocksize - EXT3_DIR_REC_LEN(0); + return 0? 22: entry_space / sizeof(struct dx_entry); +} + @@ -259,7 +260,6 @@ + hash1 = hash0; + hash0 = hash; + } -+ return 80; /* FIXME: for test only */ + return hash0; +} + @@ -1036,7 +1036,7 @@ + de = de2; + de->rec_len = cpu_to_le16(data1 + blocksize - (char *) de); + /* Initialize the root; the dot dirents already exist */ -+ de = (ext3_dirent *) (&root->fake2); ++ de = (ext3_dirent *) (&root->dotdot); + de->rec_len = cpu_to_le16(blocksize - EXT3_DIR_REC_LEN(2)); + memset (&root->info, 0, sizeof(root->info)); + root->info.info_length = sizeof(root->info); -- 1.8.3.1