public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Jean Delvare <khali@linux-fr.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] block: Fix LSF default inconsistency
Date: Fri, 12 Dec 2008 08:54:33 +0100	[thread overview]
Message-ID: <20081212075431.GG23742@kernel.dk> (raw)
In-Reply-To: <20081212084850.1b56529f@hyperion.delvare>

On Fri, Dec 12 2008, Jean Delvare wrote:
> Hi Jens,
> 
> On Thu, 11 Dec 2008 13:50:01 +0100, Jens Axboe wrote:
> > Oh right, that's pretty dumb. Lets just do the former, then a later
> > patch can replace it completely if wanted.
> > 
> > diff --git a/block/Kconfig b/block/Kconfig
> > index 1ab7c15..a785e65 100644
> > --- a/block/Kconfig
> > +++ b/block/Kconfig
> > @@ -23,22 +23,22 @@ menuconfig BLOCK
> >  
> >  if BLOCK
> >  
> > +config LSF
> > +	bool
> > +
> >  config LBD
> > -	bool "Support for Large Block Devices"
> > +	bool "Support for Large Block Devices and files"
> 
> It might be the right time to drop the extra capital letters, for
> consistency.

Agree, it's pretty ugly. Modified patch below, it drops CONFIG_LSF
completely as it's basically only used in a single spot.

> >  	depends on !64BIT
> > +	select LSF
> >  	help
> > -	  Enable block devices of size 2TB and larger.
> > +	  Enable block devices or files of size 2TB and larger.
> >  
> >  	  This option is required to support the full capacity of large
> >  	  (2TB+) block devices, including RAID, disk, Network Block Device,
> >  	  Logical Volume Manager (LVM) and loopback.
> > -
> > -	  For example, RAID devices are frequently bigger than the capacity
> > -	  of the largest individual hard drive.
> > -
> > -	  This option is not required if you have individual disk drives
> > -	  which total 2TB+ and you are not aggregating the capacity into
> > -	  a large block device (e.g. using RAID or LVM).
> > +	
> > +	  This option also enables support for single files larger than
> > +	  2TB.
> >  
> >  	  If unsure, say N.
> >  
> > @@ -57,15 +57,6 @@ config BLK_DEV_IO_TRACE
> >  
> >  	  If unsure, say N.
> >  
> > -config LSF
> > -	bool "Support for Large Single Files"
> > -	depends on !64BIT
> > -	help
> > -	  Say Y here if you want to be able to handle very large files (2TB
> > -	  and larger), otherwise say N.
> > -
> > -	  If unsure, say Y.
> > -
> >  config BLK_DEV_BSG
> >  	bool "Block layer SG support v4 (EXPERIMENTAL)"
> >  	depends on EXPERIMENTAL
> > 
> 
> Acked-by: Jean Delvare <khali@linux-fr.org>
> 
> As a side note, someone will have to tell me why changing the value of
> option LSF triggers a full kernel rebuild.

It changes types.h, I guess pretty much everything has that included :-)

diff --git a/block/Kconfig b/block/Kconfig
index 1ab7c15..195968e 100644
--- a/block/Kconfig
+++ b/block/Kconfig
@@ -24,21 +24,17 @@ menuconfig BLOCK
 if BLOCK
 
 config LBD
-	bool "Support for Large Block Devices"
+	bool "Support for large block devices and files"
 	depends on !64BIT
 	help
-	  Enable block devices of size 2TB and larger.
+	  Enable block devices or files of size 2TB and larger.
 
 	  This option is required to support the full capacity of large
 	  (2TB+) block devices, including RAID, disk, Network Block Device,
 	  Logical Volume Manager (LVM) and loopback.
-
-	  For example, RAID devices are frequently bigger than the capacity
-	  of the largest individual hard drive.
-
-	  This option is not required if you have individual disk drives
-	  which total 2TB+ and you are not aggregating the capacity into
-	  a large block device (e.g. using RAID or LVM).
+	
+	  This option also enables support for single files larger than
+	  2TB.
 
 	  If unsure, say N.
 
@@ -57,15 +53,6 @@ config BLK_DEV_IO_TRACE
 
 	  If unsure, say N.
 
-config LSF
-	bool "Support for Large Single Files"
-	depends on !64BIT
-	help
-	  Say Y here if you want to be able to handle very large files (2TB
-	  and larger), otherwise say N.
-
-	  If unsure, say Y.
-
 config BLK_DEV_BSG
 	bool "Block layer SG support v4 (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index e4a241c..04158ad 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1721,7 +1721,7 @@ static loff_t ext4_max_size(int blkbits, int has_huge_files)
 	/* small i_blocks in vfs inode? */
 	if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) {
 		/*
-		 * CONFIG_LSF is not enabled implies the inode
+		 * CONFIG_LBD is not enabled implies the inode
 		 * i_block represent total blocks in 512 bytes
 		 * 32 == size of vfs inode i_blocks * 8
 		 */
@@ -1764,7 +1764,7 @@ static loff_t ext4_max_bitmap_size(int bits, int has_huge_files)
 
 	if (!has_huge_files || sizeof(blkcnt_t) < sizeof(u64)) {
 		/*
-		 * !has_huge_files or CONFIG_LSF is not enabled
+		 * !has_huge_files or CONFIG_LBD is not enabled
 		 * implies the inode i_block represent total blocks in
 		 * 512 bytes 32 == size of vfs inode i_blocks * 8
 		 */
@@ -2021,13 +2021,13 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	if (has_huge_files) {
 		/*
 		 * Large file size enabled file system can only be
-		 * mount if kernel is build with CONFIG_LSF
+		 * mount if kernel is build with CONFIG_LBD
 		 */
 		if (sizeof(root->i_blocks) < sizeof(u64) &&
 				!(sb->s_flags & MS_RDONLY)) {
 			printk(KERN_ERR "EXT4-fs: %s: Filesystem with huge "
 					"files cannot be mounted read-write "
-					"without CONFIG_LSF.\n", sb->s_id);
+					"without CONFIG_LBD.\n", sb->s_id);
 			goto failed_mount;
 		}
 	}
diff --git a/include/linux/types.h b/include/linux/types.h
index 1d98330..121f349 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -135,19 +135,14 @@ typedef		__s64		int64_t;
  *
  * Linux always considers sectors to be 512 bytes long independently
  * of the devices real block size.
+ *
+ * blkcnt_t is the type of the inode's block count.
  */
 #ifdef CONFIG_LBD
 typedef u64 sector_t;
-#else
-typedef unsigned long sector_t;
-#endif
-
-/*
- * The type of the inode's block count.
- */
-#ifdef CONFIG_LSF
 typedef u64 blkcnt_t;
 #else
+typedef unsigned long sector_t;
 typedef unsigned long blkcnt_t;
 #endif
 

-- 
Jens Axboe


  reply	other threads:[~2008-12-12  7:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-11 10:16 [PATCH] block: Fix LSF default inconsistency Jean Delvare
2008-12-11 10:41 ` Jens Axboe
2008-12-11 10:58   ` Jean Delvare
2008-12-11 11:08     ` Jens Axboe
2008-12-11 11:33       ` KOSAKI Motohiro
2008-12-11 11:36         ` Jens Axboe
2008-12-11 11:44           ` KOSAKI Motohiro
2008-12-12  7:58             ` Jens Axboe
2008-12-12 13:50               ` Rik van Riel
2008-12-12 15:11                 ` KOSAKI Motohiro
2008-12-12 16:01                   ` Hugh Dickins
2008-12-12 16:35                     ` Rik van Riel
2008-12-12 17:37                       ` Hugh Dickins
2008-12-12 18:00                         ` Rik van Riel
2008-12-12 19:26                           ` Hugh Dickins
2008-12-11 12:44       ` Jean Delvare
2008-12-11 12:50         ` Jens Axboe
2008-12-12  7:48           ` Jean Delvare
2008-12-12  7:54             ` Jens Axboe [this message]
2008-12-12  9:41               ` Jean Delvare
2008-12-12 18:18                 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081212075431.GG23742@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox