public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* bh_count undeclared
@ 2008-05-25 15:35 Christian Kujau
  2008-05-25 23:38 ` Theodore Tso
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Kujau @ 2008-05-25 15:35 UTC (permalink / raw)
  To: linux-ext4

Hi,

while trying to build the current e2fsprogs.pu git tree, I got:

# CFLAGS="-g" ./configure --prefix=/opt/e2fsprogs --enable-htree
# make
[....]
making all in e2fsck
make[2]: Entering directory `/data/Scratch/scm/e2fsprogs-git/e2fsck'
 	CC journal.c
journal.c: In function ‘getblk’:
journal.c:76: error: ‘bh_count’ undeclared (first use in this function)
journal.c:76: error: (Each undeclared identifier is reported only once
journal.c:76: error: for each function it appears in.)
make[2]: *** [journal.o] Error 1
make[2]: Leaving directory `/data/Scratch/scm/e2fsprogs-git/e2fsck'
make[1]: *** [all-progs-recursive] Error 1
make[1]: Leaving directory `/data/Scratch/scm/e2fsprogs-git'
make: *** [all] Error 2

When looking at journal.c I see 'bh_count' declared within an #ifdef, but 
even when compiling with --enable-jfs-debug the error persists. Right now 
I just removed the #ifdef so that the build succeeds.

But, what's the real issue here?

Thanks,
Christian.
-- 
BOFH excuse #331:

those damn raccoons!
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bh_count undeclared
  2008-05-25 15:35 bh_count undeclared Christian Kujau
@ 2008-05-25 23:38 ` Theodore Tso
  2008-05-26  0:19   ` Christian Kujau
  0 siblings, 1 reply; 5+ messages in thread
From: Theodore Tso @ 2008-05-25 23:38 UTC (permalink / raw)
  To: Christian Kujau; +Cc: linux-ext4

On Sun, May 25, 2008 at 05:35:12PM +0200, Christian Kujau wrote:
> Hi,
>
> while trying to build the current e2fsprogs.pu git tree, I got:
>
> journal.c: In function ‘getblk’:
> journal.c:76: error: ‘bh_count’ undeclared (first use in this function)
>
> When looking at journal.c I see 'bh_count' declared within an #ifdef, but 
> even when compiling with --enable-jfs-debug the error persists. Right now I 
> just removed the #ifdef so that the build succeeds.
>
> But, what's the real issue here?

Whoops, my bad.  I was compiling with --enable-jfs-debug, and I didn't
notice the change I made broke things without that configuration
option.

The right fix is just to surround the bh_count reference with an
#ifdef CONFIG_JBD_DEBUG.

It's part of a quickie mechanism for detecting buffer head leaks,
which (for example) was how I detected a problem in ext4's journal
checksum recovery code.  I had made some changes to how it worked
while I was tracking down the problem, and accidentally introduced
that compile time bug.  My bad, I'll fix it.

						- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bh_count undeclared
  2008-05-25 23:38 ` Theodore Tso
@ 2008-05-26  0:19   ` Christian Kujau
  2008-05-26  1:05     ` Theodore Tso
  0 siblings, 1 reply; 5+ messages in thread
From: Christian Kujau @ 2008-05-26  0:19 UTC (permalink / raw)
  To: Theodore Tso; +Cc: linux-ext4

On Sun, 25 May 2008, Theodore Tso wrote:
> Whoops, my bad.  I was compiling with --enable-jfs-debug, and I didn't
> notice the change I made broke things without that configuration
> option.

But even *with* --enable-jfs-debug the error occured.

> The right fix is just to surround the bh_count reference with an
> #ifdef CONFIG_JBD_DEBUG.

Right now the declaration of bh_count is surrounded with an #ifdef:

#ifdef CONFIG_JBD_DEBUG     /* Enabled by configure --enable-jfs-debug */
static int bh_count = 0;
#endif

But you want the refence surrounded by this #ifdef, right?

Thanks,
Christian.
-- 
BOFH excuse #192:

runaway cat on system.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bh_count undeclared
  2008-05-26  0:19   ` Christian Kujau
@ 2008-05-26  1:05     ` Theodore Tso
  2008-05-26  2:00       ` Christian Kujau
  0 siblings, 1 reply; 5+ messages in thread
From: Theodore Tso @ 2008-05-26  1:05 UTC (permalink / raw)
  To: Christian Kujau; +Cc: linux-ext4

On Mon, May 26, 2008 at 02:19:10AM +0200, Christian Kujau wrote:
> On Sun, 25 May 2008, Theodore Tso wrote:
>> Whoops, my bad.  I was compiling with --enable-jfs-debug, and I didn't
>> notice the change I made broke things without that configuration
>> option.
>
> But even *with* --enable-jfs-debug the error occured.
>

Hmm... it shouldn't have.  It certainly works for me.

>> The right fix is just to surround the bh_count reference with an
>> #ifdef CONFIG_JBD_DEBUG.
>
> Right now the declaration of bh_count is surrounded with an #ifdef:
>
> But you want the refence surrounded by this #ifdef, right?

Yes, that's what I said.

Or grab the latest 'pu' branch that I pushed.  That should fix things
for you.

						- Ted

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: bh_count undeclared
  2008-05-26  1:05     ` Theodore Tso
@ 2008-05-26  2:00       ` Christian Kujau
  0 siblings, 0 replies; 5+ messages in thread
From: Christian Kujau @ 2008-05-26  2:00 UTC (permalink / raw)
  To: Theodore Tso; +Cc: linux-ext4

On Sun, 25 May 2008, Theodore Tso wrote:
> Or grab the latest 'pu' branch that I pushed.  That should fix things
> for you.

Great, compiling the pu branch works now :-)

Thanks,
Christian.
-- 
BOFH excuse #413:

Cow-tippers tipped a cow onto the server.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-26  2:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-25 15:35 bh_count undeclared Christian Kujau
2008-05-25 23:38 ` Theodore Tso
2008-05-26  0:19   ` Christian Kujau
2008-05-26  1:05     ` Theodore Tso
2008-05-26  2:00       ` Christian Kujau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox