ppc: Export empty_zero_page
PATCH 1/1 ppc: Export empty_zero_page
Hi,
Stephen Rothwell discovered this issue in the linux-next tree:
Quoted 10 lines
Today's powerpc allmodconfig build of linux-next failed with:
ERROR: "
empty_zero_page" [fs/ext4/ext4dev.ko] undefined!This is because commit
dde5f2130096f8469eb1aa1ad250cd2a39fee3f5("ext4:
ENOSPC error handling for writing to an uninitialized extent") usesZERO_PAGE()which on powerpc usesempty_zero_pagewhich is notEXPORT_SYMBOLedon powerpc. I have reverted that commit and a later one (1ae53f35fea49a9013353078e019469551d2ad74"ext4: zero out small extents when writing to prealloc area.") which depended on it.
Any chance you could get this pushed to Linus ASAP? It would be nice if this could get pushed before the merge window, since it could be argued that rationalizing whether or not empty_zero_page is exported is a bug fix, and anyway this is pretty much a zero-risk patch. Thanks!!
- Ted
Quoted 1 line
From
c3638c5a50de0d360210205625df2ab49508f6d3Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Tue, 11 Mar 2008 22:37:27 -0400
Subject: [PATCH] ppc: Export empty_zero_page
The empty_zero_page symbol is exported by most other architectures (s390, ia64, x86, um), and an upcoming ext4 patch needs it because ZERO_PAGE() references empty_zero_page, and we need it to zero out an unitialized extents in ext4 files.
--- arch/ppc/kernel/ppc_ksyms.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/ppc/kernel/ppc_ksyms.c +1 -0
@@ -60,6 +60,7 @@ long long __ashrdi3(long long, int);long long __ashldi3 (long long ,int );long long __lshrdi3 (long long ,int ); +EXPORT_SYMBOL (empty_zero_page);EXPORT_SYMBOL (clear_pages);EXPORT_SYMBOL (clear_user_page);EXPORT_SYMBOL (transfer_to_handler);
Signature · 1 line
1.5.4.1.144.gdfee-dirty
Quoted 28 lines · Theodore Ts'o
Hi,
Stephen Rothwell discovered this issue in the linux-next tree:
Quoted 10 lines
Today's powerpc allmodconfig build of linux-next failed with:
ERROR: "
empty_zero_page" [fs/ext4/ext4dev.ko] undefined!This is because commit
dde5f2130096f8469eb1aa1ad250cd2a39fee3f5("ext4:
ENOSPC error handling for writing to an uninitialized extent") usesZERO_PAGE()which on powerpc usesempty_zero_pagewhich is notEXPORT_SYMBOLedon powerpc. I have reverted that commit and a later one (1ae53f35fea49a9013353078e019469551d2ad74"ext4: zero out small extents when writing to prealloc area.") which depended on it.Any chance you could get this pushed to Linus ASAP? It would be nice if this could get pushed before the merge window, since it could be argued that rationalizing whether or not
empty_zero_pageis exported is a bug fix, and anyway this is pretty much a zero-risk patch. Thanks!!- Ted
Quoted 1 line
From
c3638c5a50de0d360210205625df2ab49508f6d3Mon Sep 17 00:00:00 2001From: Theodore Ts'o <[email protected]>
Date: Tue, 11 Mar 2008 22:37:27 -0400
Subject: [PATCH] ppc: Exportempty_zero_page
Quoted 8 lines
The
empty_zero_pagesymbol is exported by most other architectures (s390, ia64, x86, um), and an upcoming ext4 patch needs it becauseZERO_PAGE()referencesempty_zero_page, and we need it to zero out an unitialized extents in ext4 files.Signed-off-by "Theodore Ts'o" <[email protected]>--- arch/ppc/kernel/ppc_ksyms.c | 1 +
I suspect you meant arch/*powerpc* arch ppc, wont fix the problem ;P
Yours Tony
linux.conf.au http://www.marchsouth.org/
Jan 19 - 24 2009 The Australian Linux Technical Conference!
Quoted 3 lines · Tony Breeds
I suspect you meant
arch/*powerpc*arch ppc, wont fix the problem ;P
Um, right. I didn't know about this:
Quoted 7 lines
Why: The
arch/powerpctree is the merged architecture for ppc32 and ppc64
platforms. Currently there are efforts underway to port the remainingarch/ppcplatforms to the merged tree. New submissions to thearch/ppctree have been frozen with the 2.6.22 kernel release and that tree will remain in bug-fix only mode until its scheduled removal. Platforms that are not ported by June 2008 will be removed due to the lack of an interested maintainer.
Oops, sorry. So should I not bother with a patch to arch/ppc at all? I guess it's somewhat likely that whatever is left in arch/ppc is not likely to need to support ext4?
Back with a real patch in just a bit. :-)
- Ted
Once again, this time with feeling....
- Ted
Quoted 1 line
From
c91cfaabc17f8a53807a2f31f067a732e34a1550Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Wed, 12 Mar 2008 11:50:39 -0400
Subject: [PATCH] [PATCH] powerpc: Export empty_zero_page
The empty_zero_page symbol is exported by most other architectures (s390, ia64, x86, um), and an upcoming ext4 patch needs it because ZERO_PAGE() references empty_zero_page, and we need it to zero out an unitialized extents in ext4 files.
--- arch/powerpc/kernel/ppc_ksyms.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/powerpc/kernel/ppc_ksyms.c +1 -0
@@ -58,6 +58,7 @@ extern void program_check_exception(struct pt_regs *regs);extern void single_step_exception (struct pt_regs *regs);extern int sys_sigreturn (struct pt_regs *regs); +EXPORT_SYMBOL (empty_zero_page);EXPORT_SYMBOL (clear_pages);EXPORT_SYMBOL (copy_page);EXPORT_SYMBOL (ISA_DMA_THRESHOLD );
Signature · 1 line
1.5.4.1.144.gdfee-dirty
Quoted 13 lines · Theodore Ts'o
Stephen Rothwell discovered this issue in the linux-next tree:
Quoted 10 lines
Today's powerpc allmodconfig build of linux-next failed with:
ERROR: "
empty_zero_page" [fs/ext4/ext4dev.ko] undefined!This is because commit
dde5f2130096f8469eb1aa1ad250cd2a39fee3f5("ext4:
ENOSPC error handling for writing to an uninitialized extent") usesZERO_PAGE()which on powerpc usesempty_zero_pagewhich is notEXPORT_SYMBOLedon powerpc. I have reverted that commit and a later one (1ae53f35fea49a9013353078e019469551d2ad74"ext4: zero out small extents when writing to prealloc area.") which depended on it.
Quoted 4 lines
Any chance you could get this pushed to Linus ASAP? It would be nice if this could get pushed before the merge window, since it could be argued that rationalizing whether or not
empty_zero_pageis exported is a bug fix, and anyway this is pretty much a zero-risk patch. Thanks!!
The real fix is that ext4 shouldn't be using ZERO_PAGE(). Please use the same zeroing helpers all the other filesystems and drivers use.
So I screwed this one up. Mea culpa, mea culpa, mea maxima culpa....
I assume Stephen's already sent this to patch to you guys (I picked it up from the linux-next git tree), but just in case he didn't....
- Ted
Quoted 1 line
From
7919d4874fe991abd0b686ac1f68131c818cdb36Mon Sep 17 00:00:00 2001
From: Stephen Rothwell <[email protected]>
Date: Thu, 13 Mar 2008 16:16:10 +1100
Subject: [PATCH] really export empty_zero_page
It was being protected by CONFIG_PPC32.
--- arch/powerpc/kernel/ppc_ksyms.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/powerpc/kernel/ppc_ksyms.c +1 -1
@@ -57,7 +57,6 @@ extern void program_check_exception(struct pt_regs *regs);extern void single_step_exception (struct pt_regs *regs);extern int sys_sigreturn (struct pt_regs *regs); -EXPORT_SYMBOL (empty_zero_page);EXPORT_SYMBOL (clear_pages);EXPORT_SYMBOL (copy_page);EXPORT_SYMBOL (ISA_DMA_THRESHOLD );
@@ -191,3 +190,4 @@ EXPORT_SYMBOL(intercept_table);EXPORT_SYMBOL (__mtdcr);EXPORT_SYMBOL (__mfdcr);#endif +EXPORT_SYMBOL (empty_zero_page);
Signature · 1 line
1.5.4.1.144.gdfee-dirty
Hi Ted,
Quoted 5 lines · On Tue, 25 Mar 2008 09:54:54 -0400 Theodore Tso <[email protected]> wrote:
So I screwed this one up. Mea culpa, mea culpa, mea maxima culpa....
I assume Stephen's already sent this to patch to you guys (I picked it up from the linux-next git tree), but just in case he didn't....
Yeah, I already sent it and paulus is probably going to put it in his 2.6.26 tree.
However, have you made any progress on Christoph's suggestion:
"The real fix is that ext4 shouldn't be using ZERO_PAGE(). Please use the same zeroing helpers all the other filesystems and drivers use."
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Quoted 4 lines · Stephen Rothwell
However, have you made any progress on Christoph's suggestion:
"The real fix is that ext4 shouldn't be using
ZERO_PAGE(). Please use the same zeroing helpers all the other filesystems and drivers use."
When Aneesh asked for clarification about Christoph's suggestion, he got the following response (see attached).
- Ted
Quoted 12 lines · Aneesh Kumar K.V
Hi Christoph,
I have changes pending for ext4 which uses
ZERO_PAGE(0)to zero out file system blocks.The changes are needed to make sure we allow writing to prealloc space even when there are no space left in the file system to insert new extent details. To use
ZERO_PAGEin ext4 i would need patches to export some of the variables. I found that you answered Ted's patch at
Quoted 4 lines
http://ozlabs.org/pipermail/linuxppc-dev/2008-March/052956.html
I have a patch that does the same thing for multiple arch. Can you help me understand what you meant by zeroing helpers ?
Ok, you're actually sending down the page and not copying from it. This is probab;y okay.