Linux-ext4 Archive on lore.kernel.org
 help / color / Atom feed
* ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m
@ 2020-10-09 13:49 Sedat Dilek
  2020-10-09 14:10 ` Sedat Dilek
  0 siblings, 1 reply; 8+ messages in thread
From: Sedat Dilek @ 2020-10-09 13:49 UTC (permalink / raw)
  To: Theodore Y. Ts'o; +Cc: linux-ext4, linux-fsdevel

Hi Ted,

with <ext4.git#dev> up to commit
ab7b179af3f98772f2433ddc4ace6b7924a4e862 ("Merge branch
'hs/fast-commit-v9' into dev") I see some warnings (were reported via
kernel-test-bot)...

fs/jbd2/recovery.c:241:15: warning: unused variable 'seq' [-Wunused-variable]
fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]

...and more severe a build breakage with CONFIG_JBD2=and CONFIG_EXT4_FS=m

ERROR: modpost: "jbd2_fc_release_bufs" [fs/ext4/ext4.ko] undefined!
ERROR: modpost: "jbd2_fc_init" [fs/ext4/ext4.ko] undefined!
ERROR: modpost: "jbd2_fc_stop_do_commit" [fs/ext4/ext4.ko] undefined!
ERROR: modpost: "jbd2_fc_stop" [fs/ext4/ext4.ko] undefined!
ERROR: modpost: "jbd2_fc_start" [fs/ext4/ext4.ko] undefined!

Looks like missing exports.

Regards,
- Sedat -

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

* Re: ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m
  2020-10-09 13:49 ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m Sedat Dilek
@ 2020-10-09 14:10 ` Sedat Dilek
  2020-10-09 14:31   ` Sedat Dilek
  0 siblings, 1 reply; 8+ messages in thread
From: Sedat Dilek @ 2020-10-09 14:10 UTC (permalink / raw)
  To: Theodore Y. Ts'o; +Cc: linux-ext4, linux-fsdevel


[-- Attachment #1: Type: text/plain, Size: 2305 bytes --]

On Fri, Oct 9, 2020 at 3:49 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> Hi Ted,
>
> with <ext4.git#dev> up to commit
> ab7b179af3f98772f2433ddc4ace6b7924a4e862 ("Merge branch
> 'hs/fast-commit-v9' into dev") I see some warnings (were reported via
> kernel-test-bot)...
>
> fs/jbd2/recovery.c:241:15: warning: unused variable 'seq' [-Wunused-variable]
> fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
> uninitialized whenever 'if' condition is true
> [-Wsometimes-uninitialized]
> fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
> uninitialized whenever '||' condition is true
> [-Wsometimes-uninitialized]
>
> ...and more severe a build breakage with CONFIG_JBD2=and CONFIG_EXT4_FS=m
>
> ERROR: modpost: "jbd2_fc_release_bufs" [fs/ext4/ext4.ko] undefined!
> ERROR: modpost: "jbd2_fc_init" [fs/ext4/ext4.ko] undefined!
> ERROR: modpost: "jbd2_fc_stop_do_commit" [fs/ext4/ext4.ko] undefined!
> ERROR: modpost: "jbd2_fc_stop" [fs/ext4/ext4.ko] undefined!
> ERROR: modpost: "jbd2_fc_start" [fs/ext4/ext4.ko] undefined!
>
> Looks like missing exports.
>

This fixes it...

$ git diff
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 8a51c1ad7088..e50aeefaa217 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -754,6 +754,7 @@ int jbd2_fc_start(journal_t *journal, tid_t tid)

       return 0;
}
+EXPORT_SYMBOL(jbd2_fc_start);

/*
 * Stop a fast commit. If fallback is set, this function starts commit of
@@ -778,11 +779,13 @@ int jbd2_fc_stop(journal_t *journal)
{
       return __jbd2_fc_stop(journal, 0, 0);
}
+EXPORT_SYMBOL(jbd2_fc_stop);

int jbd2_fc_stop_do_commit(journal_t *journal, tid_t tid)
{
       return __jbd2_fc_stop(journal, tid, 1);
}
+EXPORT_SYMBOL(jbd2_fc_stop_do_commit);

/* Return 1 when transaction with given tid has already committed. */
int jbd2_transaction_committed(journal_t *journal, tid_t tid)
@@ -954,6 +957,7 @@ int jbd2_fc_release_bufs(journal_t *journal)

       return 0;
}
+EXPORT_SYMBOL(jbd2_fc_release_bufs);

/*
 * Conversion of logical to physical block numbers for the journal
@@ -1389,6 +1393,7 @@ int jbd2_fc_init(journal_t *journal, int num_fc_blks)
               return -ENOMEM;
       return 0;
}
+EXPORT_SYMBOL(jbd2_fc_init);

/* jbd2_journal_init_dev and jbd2_journal_init_inode:
 *

- Sedat -

[-- Attachment #2: jbd2-journal-fix-build-when-CONFIG_EXT4-as-module.diff --]
[-- Type: text/x-patch, Size: 1152 bytes --]

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 8a51c1ad7088..e50aeefaa217 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -754,6 +754,7 @@ int jbd2_fc_start(journal_t *journal, tid_t tid)
 
 	return 0;
 }
+EXPORT_SYMBOL(jbd2_fc_start);
 
 /*
  * Stop a fast commit. If fallback is set, this function starts commit of
@@ -778,11 +779,13 @@ int jbd2_fc_stop(journal_t *journal)
 {
 	return __jbd2_fc_stop(journal, 0, 0);
 }
+EXPORT_SYMBOL(jbd2_fc_stop);
 
 int jbd2_fc_stop_do_commit(journal_t *journal, tid_t tid)
 {
 	return __jbd2_fc_stop(journal, tid, 1);
 }
+EXPORT_SYMBOL(jbd2_fc_stop_do_commit);
 
 /* Return 1 when transaction with given tid has already committed. */
 int jbd2_transaction_committed(journal_t *journal, tid_t tid)
@@ -954,6 +957,7 @@ int jbd2_fc_release_bufs(journal_t *journal)
 
 	return 0;
 }
+EXPORT_SYMBOL(jbd2_fc_release_bufs);
 
 /*
  * Conversion of logical to physical block numbers for the journal
@@ -1389,6 +1393,7 @@ int jbd2_fc_init(journal_t *journal, int num_fc_blks)
 		return -ENOMEM;
 	return 0;
 }
+EXPORT_SYMBOL(jbd2_fc_init);
 
 /* jbd2_journal_init_dev and jbd2_journal_init_inode:
  *

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

* Re: ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m
  2020-10-09 14:10 ` Sedat Dilek
@ 2020-10-09 14:31   ` Sedat Dilek
  2020-10-09 15:45     ` Theodore Y. Ts'o
  0 siblings, 1 reply; 8+ messages in thread
From: Sedat Dilek @ 2020-10-09 14:31 UTC (permalink / raw)
  To: Theodore Y. Ts'o, Harshad Shirwadkar; +Cc: linux-ext4, linux-fsdevel

On Fri, Oct 9, 2020 at 4:10 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> On Fri, Oct 9, 2020 at 3:49 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
> >
> > Hi Ted,
> >
> > with <ext4.git#dev> up to commit
> > ab7b179af3f98772f2433ddc4ace6b7924a4e862 ("Merge branch
> > 'hs/fast-commit-v9' into dev") I see some warnings (were reported via
> > kernel-test-bot)...
> >
> > fs/jbd2/recovery.c:241:15: warning: unused variable 'seq' [-Wunused-variable]
> > fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
> > uninitialized whenever 'if' condition is true
> > [-Wsometimes-uninitialized]
> > fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
> > uninitialized whenever '||' condition is true
> > [-Wsometimes-uninitialized]
> >
> > ...and more severe a build breakage with CONFIG_JBD2=and CONFIG_EXT4_FS=m
> >
> > ERROR: modpost: "jbd2_fc_release_bufs" [fs/ext4/ext4.ko] undefined!
> > ERROR: modpost: "jbd2_fc_init" [fs/ext4/ext4.ko] undefined!
> > ERROR: modpost: "jbd2_fc_stop_do_commit" [fs/ext4/ext4.ko] undefined!
> > ERROR: modpost: "jbd2_fc_stop" [fs/ext4/ext4.ko] undefined!
> > ERROR: modpost: "jbd2_fc_start" [fs/ext4/ext4.ko] undefined!
> >
> > Looks like missing exports.
> >
>
> This fixes it...
>
> $ git diff
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 8a51c1ad7088..e50aeefaa217 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -754,6 +754,7 @@ int jbd2_fc_start(journal_t *journal, tid_t tid)
>
>        return 0;
> }
> +EXPORT_SYMBOL(jbd2_fc_start);
>
> /*
>  * Stop a fast commit. If fallback is set, this function starts commit of
> @@ -778,11 +779,13 @@ int jbd2_fc_stop(journal_t *journal)
> {
>        return __jbd2_fc_stop(journal, 0, 0);
> }
> +EXPORT_SYMBOL(jbd2_fc_stop);
>
> int jbd2_fc_stop_do_commit(journal_t *journal, tid_t tid)
> {
>        return __jbd2_fc_stop(journal, tid, 1);
> }
> +EXPORT_SYMBOL(jbd2_fc_stop_do_commit);
>
> /* Return 1 when transaction with given tid has already committed. */
> int jbd2_transaction_committed(journal_t *journal, tid_t tid)
> @@ -954,6 +957,7 @@ int jbd2_fc_release_bufs(journal_t *journal)
>
>        return 0;
> }
> +EXPORT_SYMBOL(jbd2_fc_release_bufs);
>
> /*
>  * Conversion of logical to physical block numbers for the journal
> @@ -1389,6 +1393,7 @@ int jbd2_fc_init(journal_t *journal, int num_fc_blks)
>                return -ENOMEM;
>        return 0;
> }
> +EXPORT_SYMBOL(jbd2_fc_init);
>
> /* jbd2_journal_init_dev and jbd2_journal_init_inode:
>  *
>

[ CC: Harshad Shirwadkar <harshadshirwadkar@gmail.com> ]

Hi Harschad,

Can you look at this?

git blame shows these commits are involved:

11a6ce6a4efc2 (Harshad Shirwadkar         2020-09-18 17:54:46 -0700
728) int jbd2_fc_start(journal_t *journal, tid_t tid)
11a6ce6a4efc2 (Harshad Shirwadkar         2020-09-18 17:54:46 -0700
777) int jbd2_fc_stop(journal_t *journal)
11a6ce6a4efc2 (Harshad Shirwadkar         2020-09-18 17:54:46 -0700
782) int jbd2_fc_stop_do_commit(journal_t *journal, tid_t tid)
96df8fb629b26 (Harshad Shirwadkar         2020-09-18 17:54:47 -0700
934) int jbd2_fc_release_bufs(journal_t *journal)
d37f2bf4185b5 (Harshad Shirwadkar         2020-09-18 17:54:45 -0700
1383) int jbd2_fc_init(journal_t *journal, int num_fc_blks)

11a6ce6a4efc jbd2: add fast commit machinery
96df8fb629b2 ext4: main fast-commit commit path
d37f2bf4185b ext4 / jbd2: add fast commit initialization

Regards,
- Sedat -

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

* Re: ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m
  2020-10-09 14:31   ` Sedat Dilek
@ 2020-10-09 15:45     ` Theodore Y. Ts'o
  2020-10-09 16:03       ` harshad shirwadkar
  0 siblings, 1 reply; 8+ messages in thread
From: Theodore Y. Ts'o @ 2020-10-09 15:45 UTC (permalink / raw)
  To: Sedat Dilek; +Cc: Harshad Shirwadkar, linux-ext4, linux-fsdevel

On Fri, Oct 09, 2020 at 04:31:51PM +0200, Sedat Dilek wrote:
> > This fixes it...

Sedat,

Thanks for the report and the proposed fixes!

					- Ted

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

* Re: ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m
  2020-10-09 15:45     ` Theodore Y. Ts'o
@ 2020-10-09 16:03       ` harshad shirwadkar
  2020-10-09 16:12         ` Sedat Dilek
  2020-10-10  3:14         ` Sedat Dilek
  0 siblings, 2 replies; 8+ messages in thread
From: harshad shirwadkar @ 2020-10-09 16:03 UTC (permalink / raw)
  To: Theodore Y. Ts'o; +Cc: Sedat Dilek, Ext4 Developers List, linux-fsdevel

Thanks Sedat for pointing that out and also sending out the fixes.
Ted, should I send out another version of fast commits out with
Sedat's fixes?

Thanks,
Harshad


On Fri, Oct 9, 2020 at 8:45 AM Theodore Y. Ts'o <tytso@mit.edu> wrote:
>
> On Fri, Oct 09, 2020 at 04:31:51PM +0200, Sedat Dilek wrote:
> > > This fixes it...
>
> Sedat,
>
> Thanks for the report and the proposed fixes!
>
>                                         - Ted

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

* Re: ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m
  2020-10-09 16:03       ` harshad shirwadkar
@ 2020-10-09 16:12         ` Sedat Dilek
  2020-10-10  3:14         ` Sedat Dilek
  1 sibling, 0 replies; 8+ messages in thread
From: Sedat Dilek @ 2020-10-09 16:12 UTC (permalink / raw)
  To: harshad shirwadkar
  Cc: Theodore Y. Ts'o, Ext4 Developers List, linux-fsdevel

On Fri, Oct 9, 2020 at 6:04 PM harshad shirwadkar
<harshadshirwadkar@gmail.com> wrote:
>
> Thanks Sedat for pointing that out and also sending out the fixes.
> Ted, should I send out another version of fast commits out with
> Sedat's fixes?
>

v10 :-)?

As far as I can see this has not landed in Linux-next and Stephen is
not doing new releases at the weekend.

Anyway, it is good you are at it.

Thanks.

- Sedat -

>
>
> On Fri, Oct 9, 2020 at 8:45 AM Theodore Y. Ts'o <tytso@mit.edu> wrote:
> >
> > On Fri, Oct 09, 2020 at 04:31:51PM +0200, Sedat Dilek wrote:
> > > > This fixes it...
> >
> > Sedat,
> >
> > Thanks for the report and the proposed fixes!
> >
> >                                         - Ted

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

* Re: ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m
  2020-10-09 16:03       ` harshad shirwadkar
  2020-10-09 16:12         ` Sedat Dilek
@ 2020-10-10  3:14         ` Sedat Dilek
  2020-10-13 17:43           ` harshad shirwadkar
  1 sibling, 1 reply; 8+ messages in thread
From: Sedat Dilek @ 2020-10-10  3:14 UTC (permalink / raw)
  To: harshad shirwadkar
  Cc: Theodore Y. Ts'o, Ext4 Developers List, linux-fsdevel

On Fri, Oct 9, 2020 at 6:04 PM harshad shirwadkar
<harshadshirwadkar@gmail.com> wrote:
>
> Thanks Sedat for pointing that out and also sending out the fixes.
> Ted, should I send out another version of fast commits out with
> Sedat's fixes?
>

Hi Harshad,

when you work on v10, can you look at these warnings, please?

fs/jbd2/recovery.c:241:15: warning: unused variable 'seq' [-Wunused-variable]
fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
uninitialized whenever 'if' condition is true
[-Wsometimes-uninitialized]
fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
uninitialized whenever '||' condition is true
[-Wsometimes-uninitialized]

Thanks,
- Sedat -

P.S.: Now, I see that ext4.git#dev has dropped the hs/fast-commit v9 merge.

>
>
> On Fri, Oct 9, 2020 at 8:45 AM Theodore Y. Ts'o <tytso@mit.edu> wrote:
> >
> > On Fri, Oct 09, 2020 at 04:31:51PM +0200, Sedat Dilek wrote:
> > > > This fixes it...
> >
> > Sedat,
> >
> > Thanks for the report and the proposed fixes!
> >
> >                                         - Ted

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

* Re: ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m
  2020-10-10  3:14         ` Sedat Dilek
@ 2020-10-13 17:43           ` harshad shirwadkar
  0 siblings, 0 replies; 8+ messages in thread
From: harshad shirwadkar @ 2020-10-13 17:43 UTC (permalink / raw)
  To: Sedat Dilek; +Cc: Theodore Y. Ts'o, Ext4 Developers List, linux-fsdevel

Thanks Sedat, I'll take care of this in V10.

On Fri, Oct 9, 2020 at 8:14 PM Sedat Dilek <sedat.dilek@gmail.com> wrote:
>
> On Fri, Oct 9, 2020 at 6:04 PM harshad shirwadkar
> <harshadshirwadkar@gmail.com> wrote:
> >
> > Thanks Sedat for pointing that out and also sending out the fixes.
> > Ted, should I send out another version of fast commits out with
> > Sedat's fixes?
> >
>
> Hi Harshad,
>
> when you work on v10, can you look at these warnings, please?
>
> fs/jbd2/recovery.c:241:15: warning: unused variable 'seq' [-Wunused-variable]
> fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
> uninitialized whenever 'if' condition is true
> [-Wsometimes-uninitialized]
> fs/ext4/fast_commit.c:1091:6: warning: variable 'start_time' is used
> uninitialized whenever '||' condition is true
> [-Wsometimes-uninitialized]
>
> Thanks,
> - Sedat -
>
> P.S.: Now, I see that ext4.git#dev has dropped the hs/fast-commit v9 merge.
>
> >
> >
> > On Fri, Oct 9, 2020 at 8:45 AM Theodore Y. Ts'o <tytso@mit.edu> wrote:
> > >
> > > On Fri, Oct 09, 2020 at 04:31:51PM +0200, Sedat Dilek wrote:
> > > > > This fixes it...
> > >
> > > Sedat,
> > >
> > > Thanks for the report and the proposed fixes!
> > >
> > >                                         - Ted

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

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 13:49 ext4: dev: Broken with CONFIG_JBD2=and CONFIG_EXT4_FS=m Sedat Dilek
2020-10-09 14:10 ` Sedat Dilek
2020-10-09 14:31   ` Sedat Dilek
2020-10-09 15:45     ` Theodore Y. Ts'o
2020-10-09 16:03       ` harshad shirwadkar
2020-10-09 16:12         ` Sedat Dilek
2020-10-10  3:14         ` Sedat Dilek
2020-10-13 17:43           ` harshad shirwadkar

Linux-ext4 Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-ext4/0 linux-ext4/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-ext4 linux-ext4/ https://lore.kernel.org/linux-ext4 \
		linux-ext4@vger.kernel.org
	public-inbox-index linux-ext4

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-ext4


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git