lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Mon, 4 Dec 2006 18:21:42 +0100
From:	Johann Lombardi <johann.lombardi@...l.net>
To:	linux-ext4@...r.kernel.org
Cc:	akpm@...l.org
Subject: [PATCH] ext4: fix credit calculation in ext4_ext_calc_credits_for_insert

Hello,

The patch below fixes a nit in ext4_ext_calc_credits_for_insert().
Besides, credits for the new root are already added in the index split
accounting.

Johann

Signed-off-by: Johann Lombardi <johann.lombardi@...l.net>
Signed-off-by: Alex Tomas <alex@...sterfs.com>
---

Index: linux-2.6.19/fs/ext4/extents.c
===================================================================
--- linux-2.6.19.orig/fs/ext4/extents.c	2006-12-04 16:59:41.760257656 +0100
+++ linux-2.6.19/fs/ext4/extents.c	2006-12-04 17:04:35.566592304 +0100
@@ -1534,16 +1534,17 @@ int inline ext4_ext_calc_credits_for_ins
 
 	/*
 	 * tree can be full, so it would need to grow in depth:
-	 * allocation + old root + new root
+	 * we need one credit to modify old root, credits for
+	 * new root will be added in split accounting
 	 */
-	needed += 2 + 1 + 1;
+	needed += 1;
 
 	/*
 	 * Index split can happen, we would need:
 	 *    allocate intermediate indexes (bitmap + group)
 	 *  + change two blocks at each level, but root (already included)
 	 */
-	needed = (depth * 2) + (depth * 2);
+	needed += (depth * 2) + (depth * 2);
 
 	/* any allocation modifies superblock */
 	needed += 1;
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists