Centralise definitions of sector_t and blkcnt_t
Subsystems (2)
PATCH 1/1 Centralise definitions of sector_t and blkcnt_t
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.
--- block/Kconfig | 6 ++---- include/asm-h8300/types.h | 6 ------ include/asm-i386/types.h | 10 ---------- include/asm-mips/types.h | 10 ---------- include/asm-powerpc/types.h | 10 ---------- include/asm-s390/types.h | 10 ---------- include/asm-sh/types.h | 10 ---------- include/asm-x86_64/types.h | 3 --- include/linux/types.h | 14 +++++++++----- 9 files changed, 11 insertions(+), 68 deletions(-)
block/Kconfig +2 -4
@@ -19,11 +19,9 @@ config BLOCK if BLOCK -#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
@@ -44,7 +42,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.
include/asm-h8300/types.h +0 -6
@@ -55,12 +55,6 @@ #define BITS_PER_LONG 32typedef u32 dma_addr_t ; -#define HAVE_SECTOR_T -typedef u64 sector_t ; - -#define HAVE_BLKCNT_T -typedef u64 blkcnt_t ; -#endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */
include/asm-i386/types.h +0 -10
@@ -57,16 +57,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__ */
include/asm-mips/types.h +0 -10
@@ -93,16 +93,6 @@ #elsetypedef 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__ */
include/asm-powerpc/types.h +0 -10
@@ -97,16 +97,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__ */
include/asm-s390/types.h +0 -10
@@ -87,16 +87,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__ */
include/asm-sh/types.h +0 -10
@@ -52,16 +52,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__ */
include/asm-x86_64/types.h +0 -3
@@ -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__ */
include/linux/types.h +9 -5
@@ -134,15 +134,19 @@ #define aligned_u64 unsigned long long _* * Linux always considers sectors to be 512 bytes long independently * of the devices real block size. -* -* 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
Signature · 1 line
1.4.1.1
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Jeff Garzik
Quoted 7 lines · Matthew Wilcox
CONFIG_LBDandCONFIG_LSFare spread intoasm/types.hfor no particularly good reason. Centralising the definition inlinux/types.hmeans 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.
Quoted 5 lines
Quoted 1 line
Signed-off-by Matthew Wilcox <[email protected]>Doesn't look like 2.6.19-rc1 material to me...
The only apparently "problem" has no real effect, according to you.
Huh? It adds LBD/LSF support to a bunch of architectures that haven't noticed that they needed to do anything. It stops annoying X86_64 users with a question that has no effect. It reduces memory consumption for the h8/300 port.
It's been submitted before. I had thought it was in a tree that Linus had pulled, but upon reviewing the diff, found out it was one of the patches that got left out. It was even in -mm for a while, but got chucked out due to rejects.
Why are you opposed to it going in after -rc1? This seems like the ideal time to make this kind of change -- the mad merge rush is over and patches which touch a lot of files and have a high probability of causing rejects should go in at this point, IMO. See also the discussion around the pt_regs removal from interrupt handlers.