* [PATCH][v2] e2fsprogs: fix the ptest
@ 2015-11-12 3:04 rongqing.li
2015-11-12 10:13 ` Burton, Ross
0 siblings, 1 reply; 4+ messages in thread
From: rongqing.li @ 2015-11-12 3:04 UTC (permalink / raw)
To: openembedded-core
From: Roy Li <rongqing.li@windriver.com>
1. a hard-coded path in ptest is used, fix it.
2. fix the m_bigjournal ptest failure by resetting cache goal properly
3. fix the removal test.log error by adding the correct path before
test.log
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
.../e2fsprogs/e2fsprogs/0001-reset-last_goal.patch | 51 ++++++++++++++++++++++
.../recipes-devtools/e2fsprogs/e2fsprogs/run-ptest | 2 +-
.../recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb | 2 +
3 files changed, 54 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-reset-last_goal.patch
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-reset-last_goal.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-reset-last_goal.patch
new file mode 100644
index 0000000..864e01e
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-reset-last_goal.patch
@@ -0,0 +1,51 @@
+reset last_goal when ext2fs_extent_node_split is called.
+
+Upstream-Status: Inappropriate
+
+cache_inode.patch speeds up the making ext* filesystem, but it leads
+to the m_bigjournal ptest failure; In fact, when ext2fs_extent_node_split
+is called, the cache goal should be reset
+
+the patch fixes the m_bigjournal ptest failure, and does not lost the
+speed.
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+---
+ lib/ext2fs/alloc.c | 2 +-
+ lib/ext2fs/extent.c | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/lib/ext2fs/alloc.c b/lib/ext2fs/alloc.c
+index 830fc22..5bab9db 100644
+--- a/lib/ext2fs/alloc.c
++++ b/lib/ext2fs/alloc.c
+@@ -160,7 +160,7 @@ errcode_t ext2fs_new_inode(ext2_filsys fs, ext2_ino_t dir,
+ return 0;
+ }
+
+-static blk64_t last_goal = 0;
++blk64_t last_goal = 0;
+
+ /*
+ * Stupid algorithm --- we now just search forward starting from the
+diff --git a/lib/ext2fs/extent.c b/lib/ext2fs/extent.c
+index 5cdc2e4..044a17a 100644
+--- a/lib/ext2fs/extent.c
++++ b/lib/ext2fs/extent.c
+@@ -819,6 +819,8 @@ errcode_t ext2fs_extent_replace(ext2_extent_handle_t handle,
+ *
+ * handle will be left pointing at original record.
+ */
++extern blk64_t last_goal;
++
+ errcode_t ext2fs_extent_node_split(ext2_extent_handle_t handle)
+ {
+ errcode_t retval = 0;
+@@ -936,6 +938,7 @@ errcode_t ext2fs_extent_node_split(ext2_extent_handle_t handle)
+ group = group & ~((1 << (log_flex)) - 1);
+ goal_blk = ext2fs_group_first_block2(handle->fs, group);
+ }
++ last_goal = goal_blk;
+ retval = ext2fs_alloc_block2(handle->fs, goal_blk, block_buf,
+ &new_node_pblk);
+ if (retval)
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
index 1ac2513..e02fc7f 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/run-ptest
@@ -5,7 +5,7 @@ cd ./test
if [ $? -eq 0 ]
then
echo "PASS: e2fsprogs"
- rm test.log
+ rm ../test.log
else
echo "FAIL: e2fsprogs"
fi
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
index ce7d2e8..c021306 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.42.9.bb
@@ -24,6 +24,7 @@ SRC_URI += "file://acinclude.m4 \
file://CVE-2015-0247.patch \
file://0001-libext2fs-fix-potential-buffer-overflow-in-closefs.patch \
file://copy-in-create-hardlinks-with-the-correct-directory-.patch \
+ file://0001-reset-last_goal.patch \
"
SRC_URI[md5sum] = "3f8e41e63b432ba114b33f58674563f7"
@@ -114,4 +115,5 @@ do_install_ptest() {
cp -a ${B}/tests ${D}${PTEST_PATH}/test
cp -a ${S}/tests/* ${D}${PTEST_PATH}/test
sed -e 's!../e2fsck/e2fsck!e2fsck!g' -i ${D}${PTEST_PATH}/test/*/expect*
+ sed -e 's!/usr/lib/e2fsprogs/ptest!${PTEST_PATH}!g' -i ${D}${PTEST_PATH}/test/test_*
}
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH][v2] e2fsprogs: fix the ptest
2015-11-12 3:04 [PATCH][v2] e2fsprogs: fix the ptest rongqing.li
@ 2015-11-12 10:13 ` Burton, Ross
2015-11-13 0:03 ` Rongqing Li
0 siblings, 1 reply; 4+ messages in thread
From: Burton, Ross @ 2015-11-12 10:13 UTC (permalink / raw)
To: rongqing.li@windriver.com; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 421 bytes --]
On 12 November 2015 at 03:04, <rongqing.li@windriver.com> wrote:
> +cache_inode.patch speeds up the making ext* filesystem, but it leads
> +to the m_bigjournal ptest failure; In fact, when ext2fs_extent_node_split
> +is called, the cache goal should be reset
> +
> +the patch fixes the m_bigjournal ptest failure, and does not lost the
> +speed.
>
Please edit the patch, instead of patching a patch.
Ross
[-- Attachment #2: Type: text/html, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][v2] e2fsprogs: fix the ptest
2015-11-12 10:13 ` Burton, Ross
@ 2015-11-13 0:03 ` Rongqing Li
2015-11-16 16:17 ` Burton, Ross
0 siblings, 1 reply; 4+ messages in thread
From: Rongqing Li @ 2015-11-13 0:03 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 2015年11月12日 18:13, Burton, Ross wrote:
>
> On 12 November 2015 at 03:04, <rongqing.li@windriver.com
> <mailto:rongqing.li@windriver.com>> wrote:
>
> +cache_inode.patch speeds up the making ext* filesystem, but it leads
> +to the m_bigjournal ptest failure; In fact, when
> ext2fs_extent_node_split
> +is called, the cache goal should be reset
> +
> +the patch fixes the m_bigjournal ptest failure, and does not lost the
> +speed.
>
>
> Please edit the patch, instead of patching a patch.
I did not patching a patch, I create a new patch
-Roy
>
> Ross
--
Best Reagrds,
Roy | RongQing Li
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH][v2] e2fsprogs: fix the ptest
2015-11-13 0:03 ` Rongqing Li
@ 2015-11-16 16:17 ` Burton, Ross
0 siblings, 0 replies; 4+ messages in thread
From: Burton, Ross @ 2015-11-16 16:17 UTC (permalink / raw)
To: Rongqing Li; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
On 13 November 2015 at 00:03, Rongqing Li <rongqing.li@windriver.com> wrote:
> Please edit the patch, instead of patching a patch.
>>
>
> I did not patching a patch, I create a new patch
>
Exactly. You're adding a patch that fixes a patch we created, please just
fix the broken code in the patch itself.
Ross
[-- Attachment #2: Type: text/html, Size: 824 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-16 16:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-12 3:04 [PATCH][v2] e2fsprogs: fix the ptest rongqing.li
2015-11-12 10:13 ` Burton, Ross
2015-11-13 0:03 ` Rongqing Li
2015-11-16 16:17 ` Burton, Ross
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox