public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Handle CONFIG_LBD and CONFIG_LSF in one place
@ 2006-04-19 14:05 Matthew Wilcox
  2006-04-27  1:34 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Wilcox @ 2006-04-19 14:05 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: linux-kernel, Andi Kleen, ralf, paulus, schwidefsky, lethal,
	kkojima, ysato


CONFIG_LBD and CONFIG_LSF are spread into asm/types.h for no particularly
good reason.  Centralising the definition in linux/types.h means that arch
maintainers don't need to bother adding it, as well as fixing the problem
with x86-64 users being asked to make a decision that has absolutely no
effect.  The H8/300 porters seem particularly confused since I'm not aware
of any microcontrollers that need to support 2TB filesystems these days.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>

Index: ./block/Kconfig
===================================================================
RCS file: /var/cvs/linux-2.6/block/Kconfig,v
retrieving revision 1.4
diff -u -p -r1.4 Kconfig
--- ./block/Kconfig	3 Apr 2006 13:44:01 -0000	1.4
+++ ./block/Kconfig	19 Apr 2006 13:43:26 -0000
@@ -1,11 +1,9 @@
 #
 # Block layer core configuration
 #
-#XXX - it makes sense to enable this only for 32-bit subarch's, not for x86_64
-#for instance.
 config LBD
 	bool "Support for Large Block Devices"
-	depends on X86 || (MIPS && 32BIT) || PPC32 || (S390 && !64BIT) || SUPERH || UML
+	depends on !64BIT
 	help
 	  Say Y here if you want to attach large (bigger than 2TB) discs to
 	  your machine, or if you want to have a raid or loopback device
@@ -26,7 +24,7 @@ config BLK_DEV_IO_TRACE
 
 config LSF
 	bool "Support for Large Single Files"
-	depends on X86 || (MIPS && 32BIT) || PPC32 || ARCH_S390_31 || SUPERH || UML
+	depends on !64BIT
 	help
 	  Say Y here if you want to be able to handle very large files (bigger
 	  than 2TB), otherwise say N.
Index: ./include/asm-h8300/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-h8300/types.h,v
retrieving revision 1.5
diff -u -p -r1.5 types.h
--- ./include/asm-h8300/types.h	3 Apr 2006 13:45:48 -0000	1.5
+++ ./include/asm-h8300/types.h	19 Apr 2006 13:40:47 -0000
@@ -55,12 +55,6 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
-#define HAVE_SECTOR_T
-typedef u64 sector_t;
-
-#define HAVE_BLKCNT_T
-typedef u64 blkcnt_t;
-
 #endif /* __KERNEL__ */
 
 #endif /* __ASSEMBLY__ */
Index: ./include/asm-i386/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-i386/types.h,v
retrieving revision 1.4
diff -u -p -r1.4 types.h
--- ./include/asm-i386/types.h	3 Apr 2006 13:45:49 -0000	1.4
+++ ./include/asm-i386/types.h	19 Apr 2006 13:36:02 -0000
@@ -58,16 +58,6 @@ typedef u32 dma_addr_t;
 #endif
 typedef u64 dma64_addr_t;
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: ./include/asm-mips/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-mips/types.h,v
retrieving revision 1.6
diff -u -p -r1.6 types.h
--- ./include/asm-mips/types.h	3 Apr 2006 13:45:53 -0000	1.6
+++ ./include/asm-mips/types.h	19 Apr 2006 13:36:08 -0000
@@ -94,16 +94,6 @@ typedef unsigned long long phys_t;
 typedef unsigned long phys_t;
 #endif
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: ./include/asm-powerpc/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-powerpc/types.h,v
retrieving revision 1.3
diff -u -p -r1.3 types.h
--- ./include/asm-powerpc/types.h	3 Apr 2006 13:45:55 -0000	1.3
+++ ./include/asm-powerpc/types.h	19 Apr 2006 13:36:14 -0000
@@ -98,16 +98,6 @@ typedef struct {
 	unsigned long env;
 } func_descr_t;
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: ./include/asm-s390/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-s390/types.h,v
retrieving revision 1.6
diff -u -p -r1.6 types.h
--- ./include/asm-s390/types.h	3 Apr 2006 13:45:56 -0000	1.6
+++ ./include/asm-s390/types.h	19 Apr 2006 13:36:20 -0000
@@ -88,16 +88,6 @@ typedef union {
 	} subreg;
 } register_pair;
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* ! __s390x__   */
 #endif /* __ASSEMBLY__  */
 #endif /* __KERNEL__    */
Index: ./include/asm-sh/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-sh/types.h,v
retrieving revision 1.5
diff -u -p -r1.5 types.h
--- ./include/asm-sh/types.h	3 Apr 2006 13:45:57 -0000	1.5
+++ ./include/asm-sh/types.h	19 Apr 2006 13:36:26 -0000
@@ -53,16 +53,6 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: ./include/linux/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/linux/types.h,v
retrieving revision 1.11
diff -u -p -r1.11 types.h
--- ./include/linux/types.h	3 Apr 2006 13:46:02 -0000	1.11
+++ ./include/linux/types.h	19 Apr 2006 13:40:32 -0000
@@ -130,14 +130,19 @@ typedef		__s64		int64_t;
 
 /*
  * The type used for indexing onto a disc or disc partition.
- * If required, asm/types.h can override it and define
- * HAVE_SECTOR_T
  */
-#ifndef HAVE_SECTOR_T
+#ifdef CONFIG_LBD
+typedef u64 sector_t;
+#else
 typedef unsigned long sector_t;
 #endif
 
-#ifndef HAVE_BLKCNT_T
+/*
+ * The type of the inode's block count.
+ */
+#ifdef CONFIG_LSF
+typedef u64 blkcnt_t;
+#else
 typedef unsigned long blkcnt_t;
 #endif
 

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

* Re: [PATCH] Handle CONFIG_LBD and CONFIG_LSF in one place
  2006-04-19 14:05 [PATCH] Handle CONFIG_LBD and CONFIG_LSF in one place Matthew Wilcox
@ 2006-04-27  1:34 ` Andrew Morton
  2006-04-27  5:04   ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2006-04-27  1:34 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: torvalds, linux-kernel, ak, ralf, paulus, schwidefsky, lethal,
	kkojima, ysato

Matthew Wilcox <matthew@wil.cx> wrote:
>
>  CONFIG_LBD and CONFIG_LSF are spread into asm/types.h for no particularly
>  good reason.  Centralising the definition in linux/types.h means that arch
>  maintainers don't need to bother adding it, as well as fixing the problem
>  with x86-64 users being asked to make a decision that has absolutely no
>  effect.  The H8/300 porters seem particularly confused since I'm not aware
>  of any microcontrollers that need to support 2TB filesystems these days.

x86_64:

include/linux/types.h:137: error: conflicting types for 'sector_t'
include/asm/types.h:51: error: previous declaration of 'sector_t' was here


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

* Re: [PATCH] Handle CONFIG_LBD and CONFIG_LSF in one place
  2006-04-27  1:34 ` Andrew Morton
@ 2006-04-27  5:04   ` Matthew Wilcox
  2006-04-27  5:15     ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Matthew Wilcox @ 2006-04-27  5:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: torvalds, linux-kernel, ak, ralf, paulus, schwidefsky, lethal,
	kkojima, ysato

On Wed, Apr 26, 2006 at 06:34:42PM -0700, Andrew Morton wrote:
> Matthew Wilcox <matthew@wil.cx> wrote:
> >
> >  CONFIG_LBD and CONFIG_LSF are spread into asm/types.h for no particularly
> >  good reason.  Centralising the definition in linux/types.h means that arch
> >  maintainers don't need to bother adding it, as well as fixing the problem
> >  with x86-64 users being asked to make a decision that has absolutely no
> >  effect.  The H8/300 porters seem particularly confused since I'm not aware
> >  of any microcontrollers that need to support 2TB filesystems these days.
> 
> x86_64:
> 
> include/linux/types.h:137: error: conflicting types for 'sector_t'
> include/asm/types.h:51: error: previous declaration of 'sector_t' was here

is the conflicting patch available somewhere so i can put a patch in for
it?  basically, you just need to delete the typedefs for sector_t and
blkcnt_t, just like i've done for the other architectures.

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

* Re: [PATCH] Handle CONFIG_LBD and CONFIG_LSF in one place
  2006-04-27  5:04   ` Matthew Wilcox
@ 2006-04-27  5:15     ` Andrew Morton
  2006-04-27  6:03       ` Matthew Wilcox
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2006-04-27  5:15 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: torvalds, linux-kernel, ak, ralf, paulus, schwidefsky, lethal,
	kkojima, ysato

Matthew Wilcox <matthew@wil.cx> wrote:
>
> On Wed, Apr 26, 2006 at 06:34:42PM -0700, Andrew Morton wrote:
> > Matthew Wilcox <matthew@wil.cx> wrote:
> > >
> > >  CONFIG_LBD and CONFIG_LSF are spread into asm/types.h for no particularly
> > >  good reason.  Centralising the definition in linux/types.h means that arch
> > >  maintainers don't need to bother adding it, as well as fixing the problem
> > >  with x86-64 users being asked to make a decision that has absolutely no
> > >  effect.  The H8/300 porters seem particularly confused since I'm not aware
> > >  of any microcontrollers that need to support 2TB filesystems these days.
> > 
> > x86_64:
> > 
> > include/linux/types.h:137: error: conflicting types for 'sector_t'
> > include/asm/types.h:51: error: previous declaration of 'sector_t' was here
> 
> is the conflicting patch available somewhere so i can put a patch in for
> it?

I don't think there was any conflicting patch.  I have no other patches
touching include/linux/types.h or include/asm-x86_64/types.h.


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

* Re: [PATCH] Handle CONFIG_LBD and CONFIG_LSF in one place
  2006-04-27  5:15     ` Andrew Morton
@ 2006-04-27  6:03       ` Matthew Wilcox
  0 siblings, 0 replies; 5+ messages in thread
From: Matthew Wilcox @ 2006-04-27  6:03 UTC (permalink / raw)
  To: Andrew Morton
  Cc: torvalds, linux-kernel, ak, ralf, paulus, schwidefsky, lethal,
	kkojima, ysato

On Wed, Apr 26, 2006 at 10:15:19PM -0700, Andrew Morton wrote:
> > is the conflicting patch available somewhere so i can put a patch in for
> > it?
> 
> I don't think there was any conflicting patch.  I have no other patches
> touching include/linux/types.h or include/asm-x86_64/types.h.

hm.  weird.  looks like i overlooked something somehow.  i swear i
grepped for it.

Updated patch:

CONFIG_LBD and CONFIG_LSF are spread into asm/types.h for no particularly
good reason.  Centralising the definition in linux/types.h means that arch
maintainers don't need to bother adding it, as well as fixing the problem
with x86-64 users being asked to make a decision that has absolutely no
effect.  The H8/300 porters seem particularly confused since I'm not aware
of any microcontrollers that need to support 2TB filesystems these days.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>

Index: ./block/Kconfig
===================================================================
RCS file: /var/cvs/linux-2.6/block/Kconfig,v
retrieving revision 1.4
diff -u -p -r1.4 Kconfig
--- ./block/Kconfig	3 Apr 2006 13:44:01 -0000	1.4
+++ ./block/Kconfig	19 Apr 2006 13:43:26 -0000
@@ -1,11 +1,9 @@
 #
 # Block layer core configuration
 #
-#XXX - it makes sense to enable this only for 32-bit subarch's, not for x86_64
-#for instance.
 config LBD
 	bool "Support for Large Block Devices"
-	depends on X86 || (MIPS && 32BIT) || PPC32 || (S390 && !64BIT) || SUPERH || UML
+	depends on !64BIT
 	help
 	  Say Y here if you want to attach large (bigger than 2TB) discs to
 	  your machine, or if you want to have a raid or loopback device
@@ -26,7 +24,7 @@ config BLK_DEV_IO_TRACE
 
 config LSF
 	bool "Support for Large Single Files"
-	depends on X86 || (MIPS && 32BIT) || PPC32 || ARCH_S390_31 || SUPERH || UML
+	depends on !64BIT
 	help
 	  Say Y here if you want to be able to handle very large files (bigger
 	  than 2TB), otherwise say N.
Index: ./include/asm-h8300/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-h8300/types.h,v
retrieving revision 1.5
diff -u -p -r1.5 types.h
--- ./include/asm-h8300/types.h	3 Apr 2006 13:45:48 -0000	1.5
+++ ./include/asm-h8300/types.h	19 Apr 2006 13:40:47 -0000
@@ -55,12 +55,6 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
-#define HAVE_SECTOR_T
-typedef u64 sector_t;
-
-#define HAVE_BLKCNT_T
-typedef u64 blkcnt_t;
-
 #endif /* __KERNEL__ */
 
 #endif /* __ASSEMBLY__ */
Index: ./include/asm-i386/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-i386/types.h,v
retrieving revision 1.4
diff -u -p -r1.4 types.h
--- ./include/asm-i386/types.h	3 Apr 2006 13:45:49 -0000	1.4
+++ ./include/asm-i386/types.h	19 Apr 2006 13:36:02 -0000
@@ -58,16 +58,6 @@ typedef u32 dma_addr_t;
 #endif
 typedef u64 dma64_addr_t;
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: ./include/asm-mips/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-mips/types.h,v
retrieving revision 1.6
diff -u -p -r1.6 types.h
--- ./include/asm-mips/types.h	3 Apr 2006 13:45:53 -0000	1.6
+++ ./include/asm-mips/types.h	19 Apr 2006 13:36:08 -0000
@@ -94,16 +94,6 @@ typedef unsigned long long phys_t;
 typedef unsigned long phys_t;
 #endif
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: ./include/asm-powerpc/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-powerpc/types.h,v
retrieving revision 1.3
diff -u -p -r1.3 types.h
--- ./include/asm-powerpc/types.h	3 Apr 2006 13:45:55 -0000	1.3
+++ ./include/asm-powerpc/types.h	19 Apr 2006 13:36:14 -0000
@@ -98,16 +98,6 @@ typedef struct {
 	unsigned long env;
 } func_descr_t;
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: ./include/asm-s390/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-s390/types.h,v
retrieving revision 1.6
diff -u -p -r1.6 types.h
--- ./include/asm-s390/types.h	3 Apr 2006 13:45:56 -0000	1.6
+++ ./include/asm-s390/types.h	19 Apr 2006 13:36:20 -0000
@@ -88,16 +88,6 @@ typedef union {
 	} subreg;
 } register_pair;
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* ! __s390x__   */
 #endif /* __ASSEMBLY__  */
 #endif /* __KERNEL__    */
Index: ./include/asm-sh/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-sh/types.h,v
retrieving revision 1.5
diff -u -p -r1.5 types.h
--- ./include/asm-sh/types.h	3 Apr 2006 13:45:57 -0000	1.5
+++ ./include/asm-sh/types.h	19 Apr 2006 13:36:26 -0000
@@ -53,16 +53,6 @@ typedef unsigned long long u64;
 
 typedef u32 dma_addr_t;
 
-#ifdef CONFIG_LBD
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-#endif
-
-#ifdef CONFIG_LSF
-typedef u64 blkcnt_t;
-#define HAVE_BLKCNT_T
-#endif
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: ./include/asm-x86_64/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-x86_64/types.h,v
retrieving revision 1.5
diff -u -p -r1.5 types.h
--- ./include/asm-x86_64/types.h	14 Sep 2005 12:57:48 -0000	1.5
+++ ./include/asm-x86_64/types.h	27 Apr 2006 05:44:25 -0000
@@ -48,9 +48,6 @@ typedef unsigned long long u64;
 typedef u64 dma64_addr_t;
 typedef u64 dma_addr_t;
 
-typedef u64 sector_t;
-#define HAVE_SECTOR_T
-
 #endif /* __ASSEMBLY__ */
 
 #endif /* __KERNEL__ */
Index: ./include/linux/types.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/linux/types.h,v
retrieving revision 1.11
diff -u -p -r1.11 types.h
--- ./include/linux/types.h	3 Apr 2006 13:46:02 -0000	1.11
+++ ./include/linux/types.h	19 Apr 2006 13:40:32 -0000
@@ -130,14 +130,19 @@ typedef		__s64		int64_t;
 
 /*
  * The type used for indexing onto a disc or disc partition.
- * If required, asm/types.h can override it and define
- * HAVE_SECTOR_T
  */
-#ifndef HAVE_SECTOR_T
+#ifdef CONFIG_LBD
+typedef u64 sector_t;
+#else
 typedef unsigned long sector_t;
 #endif
 
-#ifndef HAVE_BLKCNT_T
+/*
+ * The type of the inode's block count.
+ */
+#ifdef CONFIG_LSF
+typedef u64 blkcnt_t;
+#else
 typedef unsigned long blkcnt_t;
 #endif
 

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

end of thread, other threads:[~2006-04-27  6:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-19 14:05 [PATCH] Handle CONFIG_LBD and CONFIG_LSF in one place Matthew Wilcox
2006-04-27  1:34 ` Andrew Morton
2006-04-27  5:04   ` Matthew Wilcox
2006-04-27  5:15     ` Andrew Morton
2006-04-27  6:03       ` Matthew Wilcox

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