Skip to contentSkip to conversation

GFS2: Makefiles and Kconfig

PATCH In review Steven Whitehouse 5 participants 11 messages Apr 21, 2006 – Apr 24, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 13/16 GFS2: Makefiles and Kconfig

[PATCH 13/16] GFS2: Makefiles and Kconfig

This hooks GFS2 into the kernel's build system. It also adds some documentation. Note that the dlm has been moved to be under fs/dlm as per Ingo Molnar's suggestion. This patch series doesn't include the dlm however as its already in both -mm and the git tree containing GFS2 at kernel.org.

 Documentation/filesystems/gfs2.txt |   44 +++++++++++++++++++++++++++++++++++
 fs/Kconfig                         |    2 +
 fs/Makefile                        |    2 +
 fs/gfs2/Kconfig                    |   46 +++++++++++++++++++++++++++++++++++++
 fs/gfs2/Makefile                   |   42 +++++++++++++++++++++++++++++++++
 5 files changed, 136 insertions(+)
fs/Kconfig +2 -0
@@ -323,6 +323,7 @@ config FS_POSIX_ACL
 	default n
 
 source "fs/xfs/Kconfig"
+source "fs/gfs2/Kconfig"
 
 config OCFS2_FS
 	tristate "OCFS2 file system support (EXPERIMENTAL)"
@@ -1824,6 +1825,7 @@ source "fs/partitions/Kconfig"
 endmenu
 
 source "fs/nls/Kconfig"
+source "fs/dlm/Kconfig"
 
 endmenu
 
fs/Makefile +2 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_SYSFS)		+= sysfs/
 obj-y				+= devpts/
 
 obj-$(CONFIG_PROFILING)		+= dcookies.o
+obj-$(CONFIG_DLM)		+= dlm/
  
 # Do not add any filesystems before this line
 obj-$(CONFIG_REISERFS_FS)	+= reiserfs/
@@ -102,3 +103,4 @@ obj-$(CONFIG_HPPFS)		+= hppfs/
 obj-$(CONFIG_DEBUG_FS)		+= debugfs/
 obj-$(CONFIG_CONFIGFS_FS)	+= configfs/
 obj-$(CONFIG_OCFS2_FS)		+= ocfs2/
+obj-$(CONFIG_GFS2_FS)           += gfs2/
fs/gfs2/Makefile new file +42 -0

42 lines not on this page · raw message

fs/gfs2/Kconfig new file +46 -0

46 lines not on this page · raw message

Documentation/filesystems/gfs2.txt new file +44 -0

44 lines not on this page · raw message

#1 lore raw

fs/Kconfig source "fs/partitions/Kconfig" · line 1828

Quoted 8 lines · Steven Whitehouse

...

fs/Kconfig +1 -0
...
 
 source "fs/nls/Kconfig"
+source "fs/dlm/Kconfig"
...

File doesn't exist

fs/Makefile obj-$(CONFIG_SYSFS) += sysfs/ · line 51

Quoted 8 lines
fs/Makefile +1 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_SYSFS)         += sysfs/
 obj-y                                += devpts/
 
 obj-$(CONFIG_PROFILING)              += dcookies.o
+obj-$(CONFIG_DLM)            += dlm/
...

Directory doesn't exist.

fs/gfs2/Kconfig line 6

Quoted 10 lines
fs/gfs2/Kconfig new file +6 -0
@@ -0,0 +1,46 @@
+config GFS2_FS
+        tristate "GFS2 file system support"
+	default m
+	depends on EXPERIMENTAL
+        select FS_POSIX_ACL
+        select SYSFS
...

- tabs <-> spaces (tabs are correct)
- please remove the "default m"
- "depends on SYSFS" instead of the select

fs/gfs2/Kconfig line 39

Quoted 5 lines
fs/gfs2/Kconfig new file +4 -0
+config GFS2_FS_LOCKING_DLM
+	tristate "GFS2 DLM locking module"
+	depends on GFS2_FS
+	select DLM
...

DLM in -mm depends on IPV6 || IPV6=n, so if you are select'ing it you have to add this dependency to GFS2_FS_LOCKING_DLM.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#2 lore raw
Quoted 4 lines · Adrian Bunk
Quoted 4 lines
fs/gfs2/Kconfig new file +1 -0
@@ -0,0 +1,46 @@
+config GFS2_FS
Quoted 8 lines

fs/gfs2/Kconfig line 6

Quoted 6 lines
fs/gfs2/Kconfig new file +5 -0
+        tristate "GFS2 file system support"
+	default m
+	depends on EXPERIMENTAL
+        select FS_POSIX_ACL
+        select SYSFS
...

- "depends on SYSFS" instead of the select

Why? It's more natural to select it rather than depend on it.

#3 lore raw
Quoted 14 lines · Matthew Wilcox
Quoted 4 lines · Adrian Bunk
Quoted 4 lines
fs/gfs2/Kconfig new file +1 -0
@@ -0,0 +1,46 @@
+config GFS2_FS
Quoted 8 lines

fs/gfs2/Kconfig line 6

Quoted 6 lines
fs/gfs2/Kconfig new file +5 -0
+        tristate "GFS2 file system support"
+	default m
+	depends on EXPERIMENTAL
+        select FS_POSIX_ACL
+        select SYSFS
...

- "depends on SYSFS" instead of the select

Quoted 1 line

Why? It's more natural to select it rather than depend on it.

The rule of thumb is that an option is either user visible and should be depended on or not user visible and should be select'ed.

Exceptions are possible, but there should be a good reason for them.

It doesn't matter much in this case unless you are really expecting people to use EMBEDDED=y (IOW: _very_ space limited system) and GFS2_FS=y/m.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#4 lore raw
Quoted 8 lines · Adrian Bunk
Quoted 4 lines · Matthew Wilcox
Quoted 1 line · Adrian Bunk

- "depends on SYSFS" instead of the select

Why? It's more natural to select it rather than depend on it.

The rule of thumb is that an option is either user visible and should be depended on or not user visible and should be select'ed.

What rubbish! Who came up with this rule of thumb?

My rule of thumb is that if an option is infrastructure, then it should be selected. If it's an addition, then it should be depended.

For example, in SCSI, the transport attributes are individually selectable, but any driver that wants to use a transport selects it. It would be foolish to have to answer questions from users who want to know why they can't select SCSI_AHA152X any more and are told they have to enable the obscure piece of infrastructure.

An exmaple in the other direction is BRIDGE_NETFILTER. It would be silly to *not* depend on NETFILTER. The user has said they don't want to do any kind of network filtering, so would only get annoyed at being asked about different kinds of network filtering.

This case is clearly infrastructure. The user knows whether or not they want GFS. If they have to enable sysfs to get GFS, this will only perplex them.

Obviously, it's not always easy to figure out whether the relationship between two pieces of code is infrastructure or addition. Sometimes it's a judgement call.

#5 lore raw
Quoted 11 lines · Matthew Wilcox
Quoted 8 lines · Adrian Bunk
Quoted 4 lines · Matthew Wilcox
Quoted 1 line · Adrian Bunk

- "depends on SYSFS" instead of the select

Why? It's more natural to select it rather than depend on it.

The rule of thumb is that an option is either user visible and should be depended on or not user visible and should be select'ed.

What rubbish! Who came up with this rule of thumb?

Currently menuconfig makes it a very difficult job to undo a select.
Homework: try to do "make allmodconfig" and then set CONFIG_HOTPLUG=n

You will be hit by CONFIG_FW_LOADER that is 'selected' by many instances - and then it becomes very difficult.
So until menuconfig has better support for undoing select the rule of thumb outlined by Adrian is true.

Sam

#6 lore raw
In reply to Adrian Bunk
Quoted 6 lines · Adrian Bunk
Quoted 6 lines
fs/gfs2/Kconfig new file +3 -0
@@ -0,0 +1,46 @@
+config GFS2_FS
+        tristate "GFS2 file system support"
+	default m
Quoted 8 lines

fs/gfs2/Kconfig line 6

Quoted 4 lines
fs/gfs2/Kconfig new file +3 -0
+	depends on EXPERIMENTAL
+        select FS_POSIX_ACL
+        select SYSFS
...

- tabs <-> spaces (tabs are correct)
- please remove the "default m"
- "depends on SYSFS" instead of the select

Why do you depend on sysfs at all? If it's not enabled, your code should still build just fine, right? If not, please let us know and we will fix the build error in the sysfs.h header file.

thanks,

greg k-h

#7 lore raw

Hi,

Quoted 16 lines · Greg KH
Quoted 6 lines · Adrian Bunk
Quoted 6 lines
fs/gfs2/Kconfig new file +3 -0
@@ -0,0 +1,46 @@
+config GFS2_FS
+        tristate "GFS2 file system support"
+	default m
Quoted 8 lines

fs/gfs2/Kconfig line 6

Quoted 4 lines
fs/gfs2/Kconfig new file +3 -0
+	depends on EXPERIMENTAL
+        select FS_POSIX_ACL
+        select SYSFS
...

- tabs <-> spaces (tabs are correct)
- please remove the "default m"
- "depends on SYSFS" instead of the select

Quoted 7 lines

Why do you depend on sysfs at all? If it's not enabled, your code should still build just fine, right? If not, please let us know and we will fix the build error in the sysfs.h header file.

thanks,

greg k-h

I've removed this dependency now. Thanks for pointing this out,

Steve.

#8 lore raw
In reply to Adrian Bunk

Hi,

Quoted 18 lines · Adrian Bunk

fs/Kconfig source "fs/partitions/Kconfig" · line 1828

Quoted 8 lines · Steven Whitehouse

...

fs/Kconfig +1 -0
...
 
 source "fs/nls/Kconfig"
+source "fs/dlm/Kconfig"
...

File doesn't exist

Quoted 5 lines
fs/Makefile +0 -0
@@ -48,6 +48,7 @@ obj-$(CONFIG_SYSFS)         += sysfs/
 obj-y                                += devpts/
 
Quoted 6 lines

fs/Makefile obj-$(CONFIG_SYSFS) += sysfs/ · line 51

Quoted 3 lines
fs/Makefile +1 -0
 obj-$(CONFIG_PROFILING)              += dcookies.o
+obj-$(CONFIG_DLM)            += dlm/
...

Directory doesn't exist.

The above two anomalies are due to the git tree also containing the DLM (already in -mm) and I forgot to redo this patch which is the only one which overlaps with the DLM code. I expect that Andrew Morton will update the version of the DLM in -mm at the same time as taking GFS2 when it is deemed ready to go in.

Quoted 5 lines
Quoted 5 lines
fs/gfs2/Kconfig new file +2 -0
@@ -0,0 +1,46 @@
+config GFS2_FS
+        tristate "GFS2 file system support"
Quoted 8 lines

fs/gfs2/Kconfig line 6

Quoted 5 lines
fs/gfs2/Kconfig new file +4 -0
+	default m
+	depends on EXPERIMENTAL
+        select FS_POSIX_ACL
+        select SYSFS
...

- tabs <-> spaces (tabs are correct)
- please remove the "default m"

These two are done in:
http://www.kernel.org/git/?p=linux/kernel/git/steve/gfs2-2.6.git;a=commitdiff;h=b5ea3e1ef307548bdd40fff6aba5fc96b002f284

Quoted 2 lines

- "depends on SYSFS" instead of the select

This has been resolved by removing the dependency completely.

Quoted 9 lines

fs/gfs2/Kconfig line 39

Quoted 5 lines
fs/gfs2/Kconfig new file +4 -0
+config GFS2_FS_LOCKING_DLM
+	tristate "GFS2 DLM locking module"
+	depends on GFS2_FS
+	select DLM
...

DLM in -mm depends on IPV6 || IPV6=n, so if you are select'ing it you have to add this dependency to GFS2_FS_LOCKING_DLM.

Quoted 3 lines

cu
Adrian

I will check this with the DLM developers and see what the best solution is. Thanks for the feedback,

Steve.

#9 lore raw
In reply to Steven Whitehouse

fs/gfs2/Makefile line 6

Quoted 9 lines
fs/gfs2/Makefile new file +6 -0
@@ -0,0 +1,42 @@
+obj-$(CONFIG_GFS2_FS) += gfs2.o
+gfs2-y := \
+	acl.o \
+	bits.o \
+	bmap.o \
+	daemon.o \

...
+ trans.o \

fs/gfs2/Makefile line 38

Quoted 2 lines
fs/gfs2/Makefile new file +2 -0
+	unlinked.o \
+	util.o

A fewer number of lines please.
gfs2-y := acl.o bits.o bmap.o
...
gfs2-y += trans.o unlinked.o util.o

fs/gfs2/Makefile line 41

Quoted 3 lines
fs/gfs2/Makefile new file +3 -0
+
+obj-$(CONFIG_GFS2_FS_LOCKING_NOLOCK) += locking/nolock/
+obj-$(CONFIG_GFS2_FS_LOCKING_DLM) += locking/dlm/

Can we get rid f the locking sub-directory - maybe like this:
+obj-$(CONFIG_GFS2_FS_LOCKING_NOLOCK) += no-lock/
+obj-$(CONFIG_GFS2_FS_LOCKING_DLM += dlm-lock/

Sam

#10 lore raw

Hi,

Quoted 11 lines · Sam Ravnborg

fs/gfs2/Makefile line 6

Quoted 9 lines
fs/gfs2/Makefile new file +6 -0
@@ -0,0 +1,42 @@
+obj-$(CONFIG_GFS2_FS) += gfs2.o
+gfs2-y := \
+	acl.o \
+	bits.o \
+	bmap.o \
+	daemon.o \

...
+ trans.o \

Quoted 7 lines

fs/gfs2/Makefile line 38

Quoted 2 lines
fs/gfs2/Makefile new file +2 -0
+	unlinked.o \
+	util.o

A fewer number of lines please.
gfs2-y := acl.o bits.o bmap.o
...
gfs2-y += trans.o unlinked.o util.o

I've made it a fewer number of lines now:
http://www.kernel.org/git/?p=linux/kernel/git/steve/gfs2-2.6.git;a=commitdiff;h=b5ea3e1ef307548bdd40fff6aba5fc96b002f284

Quoted 9 lines

fs/gfs2/Makefile line 41

Quoted 4 lines
fs/gfs2/Makefile new file +3 -0
+
+obj-$(CONFIG_GFS2_FS_LOCKING_NOLOCK) += locking/nolock/
+obj-$(CONFIG_GFS2_FS_LOCKING_DLM) += locking/dlm/

Can we get rid f the locking sub-directory - maybe like this:

(quoted diff) +2 -0
+obj-$(CONFIG_GFS2_FS_LOCKING_NOLOCK) += no-lock/
+obj-$(CONFIG_GFS2_FS_LOCKING_DLM     += dlm-lock/

Sam

I'd rather keep the subdirectory if there are no strong objections to it. Its quite likely that as time goes on, GFS will gather both further locking modules and even other non-locking related modules which would fit more naturally as subdirectories of fs/gfs2 directly,

Steve.