Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1308408 > unrolled thread

[PATCH] logfs: clarify MTD dependency

Started byArnd Bergmann <arnd@arndb.de>
First post2016-01-13 14:30 +0100
Last post2016-01-13 22:40 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] logfs: clarify MTD dependency Arnd Bergmann <arnd@arndb.de> - 2016-01-13 14:30 +0100
    Re: [PATCH] logfs: clarify MTD dependency Andrew Morton <akpm@linux-foundation.org> - 2016-01-13 21:40 +0100
      Re: [PATCH] logfs: clarify MTD dependency Arnd Bergmann <arnd@arndb.de> - 2016-01-13 21:50 +0100
        Re: [PATCH] logfs: clarify MTD dependency Randy Dunlap <rdunlap@infradead.org> - 2016-01-13 22:40 +0100

#1308408 — [PATCH] logfs: clarify MTD dependency

FromArnd Bergmann <arnd@arndb.de>
Date2016-01-13 14:30 +0100
Subject[PATCH] logfs: clarify MTD dependency
Message-ID<qQtEU-hT-65@gated-at.bofh.it>
After a change to the way that composite modules work, we get
a logfs build error:

fs/built-in.o: In function `logfs_mount':
:(.text+0x139d34): undefined reference to `logfs_get_sb_mtd'
fs/built-in.o: In function `logfs_get_sb_bdev':
:(.text+0x13aa08): undefined reference to `logfs_get_sb_mtd'

This patch avoids the error by changing the dependencies of
logfs in a way that we can no longer configure logfs as built-in
when the MTD core is a loadable module, while leaving the
dependency to require at least one of MTD or BLOCK to be
enabled.

Another patch tried to work around the problem, but accidentally
dropped the dependency on 'BLOCK || MTD', allowing the file
system to be built if neither is selected.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: cf4f21938e13 ("kbuild: Allow to specify composite modules with modname-m")
Fixes: e6be296f680c ("logfs: fix logfs build errors and dependencies")
---
I originally sent the patch November 27, but the discussion did not
conclude, see https://lkml.org/lkml/2015/11/27/299

This version is rebased on the patch that got applied yesterday.

diff --git a/fs/logfs/Kconfig b/fs/logfs/Kconfig
index 2b1485a5c086..2b4503163930 100644
--- a/fs/logfs/Kconfig
+++ b/fs/logfs/Kconfig
@@ -1,7 +1,6 @@
 config LOGFS
 	tristate "LogFS file system"
-	depends on BLOCK || BLOCK=n
-	depends on MTD || MTD=n
+	depends on MTD || (!MTD && BLOCK)
 	select ZLIB_INFLATE
 	select ZLIB_DEFLATE
 	select CRC32

[toc] | [next] | [standalone]


#1308793

FromAndrew Morton <akpm@linux-foundation.org>
Date2016-01-13 21:40 +0100
Message-ID<qQAn0-4VL-23@gated-at.bofh.it>
In reply to#1308408
On Wed, 13 Jan 2016 14:25:55 +0100 Arnd Bergmann <arnd@arndb.de> wrote:

> After a change to the way that composite modules work, we get
> a logfs build error:
> 
> fs/built-in.o: In function `logfs_mount':
> :(.text+0x139d34): undefined reference to `logfs_get_sb_mtd'
> fs/built-in.o: In function `logfs_get_sb_bdev':
> :(.text+0x13aa08): undefined reference to `logfs_get_sb_mtd'
> 
> This patch avoids the error by changing the dependencies of
> logfs in a way that we can no longer configure logfs as built-in
> when the MTD core is a loadable module, while leaving the
> dependency to require at least one of MTD or BLOCK to be
> enabled.
> 
> Another patch tried to work around the problem, but accidentally
> dropped the dependency on 'BLOCK || MTD', allowing the file
> system to be built if neither is selected.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: cf4f21938e13 ("kbuild: Allow to specify composite modules with modname-m")
> Fixes: e6be296f680c ("logfs: fix logfs build errors and dependencies")

Randy's "logfs: fix logfs build errors and dependencies" is an
only-in-mm thing.  So it would make sense to combine the two patches
into a single one and to give that an appropriate changelog.

How does this look? (Primary author was chosen randomly)


From: Arnd Bergmann <arnd@arndb.de>
Subject: logfs: fix logfs build errors and dependencies

Fix build errors that happen when CONFIG_LOGFS=y and CONFIG_MTD=m:

fs/built-in.o: In function `logfs_mount':
super.c:(.text+0x92a6f): undefined reference to `logfs_get_sb_mtd'
fs/built-in.o: In function `logfs_get_sb_bdev':
(.text+0x93530): undefined reference to `logfs_get_sb_mtd'

This patch avoids the error by changing the dependencies of
logfs in a way that we can no longer configure logfs as built-in
when the MTD core is a loadable module, while leaving the
dependency to require at least one of MTD or BLOCK to be
enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Peter Chen <peter.chen@freescale.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Joern Engel <joern@logfs.org>
Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/logfs/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN fs/logfs/Kconfig~logfs-fix-logfs-build-errors-and-dependencies fs/logfs/Kconfig
--- a/fs/logfs/Kconfig~logfs-fix-logfs-build-errors-and-dependencies
+++ a/fs/logfs/Kconfig
@@ -1,6 +1,6 @@
 config LOGFS
 	tristate "LogFS file system"
-	depends on (MTD || BLOCK)
+	depends on MTD || (!MTD && BLOCK)
 	select ZLIB_INFLATE
 	select ZLIB_DEFLATE
 	select CRC32
_

[toc] | [prev] | [next] | [standalone]


#1308794

FromArnd Bergmann <arnd@arndb.de>
Date2016-01-13 21:50 +0100
Message-ID<qQAwF-50b-1@gated-at.bofh.it>
In reply to#1308793
On Wednesday 13 January 2016 12:39:18 Andrew Morton wrote:
> 
> Randy's "logfs: fix logfs build errors and dependencies" is an
> only-in-mm thing.  So it would make sense to combine the two patches
> into a single one and to give that an appropriate changelog.
> 
> How does this look? (Primary author was chosen randomly)
> 
> 
> From: Arnd Bergmann <arnd@arndb.de>
> Subject: logfs: fix logfs build errors and dependencies
> 
> Fix build errors that happen when CONFIG_LOGFS=y and CONFIG_MTD=m:
> 
> fs/built-in.o: In function `logfs_mount':
> super.c:(.text+0x92a6f): undefined reference to `logfs_get_sb_mtd'
> fs/built-in.o: In function `logfs_get_sb_bdev':
> (.text+0x93530): undefined reference to `logfs_get_sb_mtd'
> 
> This patch avoids the error by changing the dependencies of
> logfs in a way that we can no longer configure logfs as built-in
> when the MTD core is a loadable module, while leaving the
> dependency to require at least one of MTD or BLOCK to be
> enabled.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Michal Marek <mmarek@suse.cz>
> Cc: Peter Chen <peter.chen@freescale.com>
> Cc: Randy Dunlap <rdunlap@infradead.org>
> Cc: Joern Engel <joern@logfs.org>
> Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> 

Looks good, thanks!

	Arnd

[toc] | [prev] | [next] | [standalone]


#1308830

FromRandy Dunlap <rdunlap@infradead.org>
Date2016-01-13 22:40 +0100
Message-ID<qQBj5-5yt-25@gated-at.bofh.it>
In reply to#1308794
On 01/13/16 12:45, Arnd Bergmann wrote:
> On Wednesday 13 January 2016 12:39:18 Andrew Morton wrote:
>>
>> Randy's "logfs: fix logfs build errors and dependencies" is an
>> only-in-mm thing.  So it would make sense to combine the two patches
>> into a single one and to give that an appropriate changelog.
>>
>> How does this look? (Primary author was chosen randomly)
>>
>>
>> From: Arnd Bergmann <arnd@arndb.de>
>> Subject: logfs: fix logfs build errors and dependencies
>>
>> Fix build errors that happen when CONFIG_LOGFS=y and CONFIG_MTD=m:
>>
>> fs/built-in.o: In function `logfs_mount':
>> super.c:(.text+0x92a6f): undefined reference to `logfs_get_sb_mtd'
>> fs/built-in.o: In function `logfs_get_sb_bdev':
>> (.text+0x93530): undefined reference to `logfs_get_sb_mtd'
>>
>> This patch avoids the error by changing the dependencies of
>> logfs in a way that we can no longer configure logfs as built-in
>> when the MTD core is a loadable module, while leaving the
>> dependency to require at least one of MTD or BLOCK to be
>> enabled.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Michal Marek <mmarek@suse.cz>
>> Cc: Peter Chen <peter.chen@freescale.com>
>> Cc: Randy Dunlap <rdunlap@infradead.org>
>> Cc: Joern Engel <joern@logfs.org>
>> Cc: Prasad Joshi <prasadjoshi.linux@gmail.com>
>> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>>
> 
> Looks good, thanks!
> 
> 	Arnd
> 

Thanks also.

-- 
~Randy

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web