Skip to contentSkip to conversation

reiser4: fix up incorrect recalculation of maximal balance overhead

PATCH In review Edward Shishkin 2 participants 2 messages May 6, 2016 – May 25, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 reiser4: fix up incorrect recalculation of maximal balance overhead

Fix up incorrect recalculation of maximal balance overhead.

---
 fs/reiser4/tree_mod.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
fs/reiser4/tree_mod.c +3 -2
@@ -159,7 +159,7 @@ znode *reiser4_add_tree_root(znode * old
 
 				/* recalculate max balance overhead */
 				tree->estimate_one_insert =
-				    estimate_one_insert_item(tree);
+					calc_estimate_one_insert(tree->height);
 
 				tree->root_block = *znode_get_block(new_root);
 				in_parent = &new_root->in_parent;
@@ -303,7 +303,8 @@ static int reiser4_kill_root(reiser4_tre
 		--tree->height;
 
 		/* recalculate max balance overhead */
-		tree->estimate_one_insert = estimate_one_insert_item(tree);
+		tree->estimate_one_insert =
+			calc_estimate_one_insert(tree->height);
 
 		assert("nikita-1202",
 		       tree->height == znode_get_level(new_root));
#1 lore raw

Hello,

reiser4-max-balance-overhead-update-fixup.patch failed to apply to linux-4.6.tar.xz

Is it needed as build failed ?
Thanks
--Glenn

From build log

[   44s] + '[' -e /home/abuild/rpmbuild/SOURCES/linux-4.6.tar.xz ']'
[   44s] + SYMBOLS=
[   44s] + test -e /home/abuild/rpmbuild/SOURCES/extra-symbols
[   44s] + cd /home/abuild/rpmbuild/BUILD
[   44s] + rm -rf kernel-vanilla-4.6.0
[   44s] + /usr/bin/mkdir -p kernel-vanilla-4.6.0
[   44s] + cd kernel-vanilla-4.6.0
[   44s] + /usr/bin/xz -dc /home/abuild/rpmbuild/SOURCES/linux-4.6.tar.xz
[   44s] + /bin/tar -xf -
[   58s] + STATUS=0
[   58s] + '[' 0 -ne 0 ']'
[   58s] + /bin/tar -xf -
.
.
[   58s] + /home/abuild/rpmbuild/SOURCES/guards --default=0 base
[   58s] + cd linux-4.6
[   58s] + /home/abuild/rpmbuild/SOURCES/apply-patches --vanilla

/home/abuild/rpmbuild/SOURCES/series.conf ..
[ 58s] + patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/lustre-lloop-dont-change-logical-size
[ 59s] + patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/lightnvm-warning-fixes.patch
[ 59s] + patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/firmware-path
[ 59s] + patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/cloneconfig.diff
[ 59s] + patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/reiser4-for-4.6.0.patch
[ 59s] + patch -s -F0 -E -p1 --no-backup-if-mismatch -i
../patches.rpmify/reiser4-max-balance-overhead-update-fixup.patch

[   59s] Reversed (or previously applied) patch detected!  Assume -R? [n] 
[   59s] Apply anyway? [n] 
[   59s] 2 out of 2 hunks ignored -- saving rejects to file

fs/reiser4/tree_mod.c.rej
[ 59s] ++ echo '*** patch
../patches.rpmify/reiser4-max-balance-overhead-update-fixup.patch failed ***'
[ 59s] *** patch
../patches.rpmify/reiser4-max-balance-overhead-update-fixup.patch failed
***
[ 59s] error: Bad exit status from /var/tmp/rpm-tmp.ttJkpx (%prep)