linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [UPDATE][12/24]ext3 enlarge blocksize
@ 2006-05-30 12:24 sho
  2006-05-30 19:12 ` Andreas Dilger
  0 siblings, 1 reply; 6+ messages in thread
From: sho @ 2006-05-30 12:24 UTC (permalink / raw)
  To: adilger; +Cc: cmm, jitendra, ext2-devel, linux-kernel, tytso, sct

Hi Andreas,

On May 26, 2006, Andreas wrote:
> At least part of this patch can be included into the patch series that
> Mingming has posted to allow larger block sizes on architectures that
> support it.  This doesn't need a separate COMPAT flag itself, since
> older kernels will already refuse to mount a filesystem with 
> large blocks.

Do you mention block size?  I don't use the COMPAT flag for large block
size, but for >2G blocks.

> On May 25, 2006  21:49 +0900, sho@tnes.nec.co.jp wrote:
> > @@ -1463,11 +1463,17 @@ static int ext3_fill_super (struct super
> > +	if (blocksize > PAGE_SIZE) {
> > +		printk(KERN_ERR "EXT3-fs: cannot mount filesystem with "
> > +		       "blocksize %u larger than PAGE_SIZE %u on %s\n",
> > +		       blocksize, PAGE_SIZE, sb->s_id);
> > +		goto failed_mount;
> > +	}
> > +
> >  	if (blocksize < EXT3_MIN_BLOCK_SIZE ||
> > -	    blocksize > EXT3_MAX_BLOCK_SIZE) {
> > +	    blocksize > EXT3_EXTENDED_MAX_BLOCK_SIZE) {
> 
> We may as well just change EXT3_MAX_BLOCK_SIZE to be 65536, 
> because no other
> code uses this value.  It is already 65536 in the e2fsprogs.

Agree.

> 
> > -		printk(KERN_ERR 
> > -		       "EXT3-fs: Unsupported filesystem 
> blocksize %d on %s.\n",
> > -		       blocksize, sb->s_id);
> > +		printk(KERN_ERR "EXT3-fs: Unsupported 
> filesystem blocksize %d on %s.\n",
> > +				 blocksize, sb->s_id);
> 
> I'm not sure why you changed the formatting of this message 
> to now be longer
> than 80 columns.

Oops, you are right.

Thanks a lot, Andreas!


Cheers, sho



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

* Re: [UPDATE][12/24]ext3 enlarge blocksize
  2006-05-30 12:24 [UPDATE][12/24]ext3 enlarge blocksize sho
@ 2006-05-30 19:12 ` Andreas Dilger
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Dilger @ 2006-05-30 19:12 UTC (permalink / raw)
  To: sho; +Cc: cmm, jitendra, ext2-devel, linux-kernel, tytso, sct

On May 30, 2006  21:24 +0900, sho@tnes.nec.co.jp wrote:
> On May 26, 2006, Andreas wrote:
> > At least part of this patch can be included into the patch series that
> > Mingming has posted to allow larger block sizes on architectures that
> > support it.  This doesn't need a separate COMPAT flag itself, since
> > older kernels will already refuse to mount a filesystem with 
> > large blocks.
> 
> Do you mention block size?

Yes, it just seemed confusing to be including these two items in the
same patch.  I was trying to indicate that the 64k block support should
be submitted to Mingming as a standalone patch atop her patch series,
which is the one that will be submitted for kernel inclusion.

> I don't use the COMPAT flag for large block size, but for >2G blocks.

Agreed.  However, there will be a different COMPAT flag for large
filesystems introduced as part of the other 48-bit ext3 changes.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.


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

* Re: [UPDATE][12/24]ext3 enlarge blocksize
  2006-06-05 13:13   ` Johann Lombardi
@ 2006-06-05 20:13     ` Andreas Dilger
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Dilger @ 2006-06-05 20:13 UTC (permalink / raw)
  To: Johann Lombardi; +Cc: sho, cmm, jitendra, ext2-devel, linux-kernel

On Jun 05, 2006  15:13 +0200, Johann Lombardi wrote:
> On Fri, May 26, 2006 at 06:00:32AM -0600, Andreas Dilger wrote:
> > On May 25, 2006  21:49 +0900, sho@tnes.nec.co.jp wrote:
> > > @@ -1463,11 +1463,17 @@ static int ext3_fill_super (struct super
> > > +	if (blocksize > PAGE_SIZE) {
> > > +		printk(KERN_ERR "EXT3-fs: cannot mount filesystem with "
> > > +		       "blocksize %u larger than PAGE_SIZE %u on %s\n",
> > > +		       blocksize, PAGE_SIZE, sb->s_id);
> > > +		goto failed_mount;
> > > +	}
> > > +
> > >  	if (blocksize < EXT3_MIN_BLOCK_SIZE ||
> > > -	    blocksize > EXT3_MAX_BLOCK_SIZE) {
> > > +	    blocksize > EXT3_EXTENDED_MAX_BLOCK_SIZE) {
> > 
> > We may as well just change EXT3_MAX_BLOCK_SIZE to be 65536, because no other
> > code uses this value.  It is already 65536 in the e2fsprogs.
> 
> AFAICS, ext3_dir_entry_2->rec_len will overflow with a 64kB blocksize.
> Do you know how ext2 handles this?

Hmm, good question, I hadn't considered this.  One option is to just limit
rec_len to 32768 or less (16k, 8k, 4k?), and require that there be multiple
such records in a directory block.  We could additionally require that the
records don't span such a boundary, which would potentially make it easier
to validate broken entries themselves, but would slightly hurt the case
where there are many large filenames.

I suppose the reason this wasn't hit during previous 64kB block testing is
that this has always been tested in relation to IO performance and not with
metadata, so the directories were probably all single-block dirs with a
"." and ".." entry at the beginning and a 65512-byte rec_len for the rest.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.


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

* Re: [UPDATE][12/24]ext3 enlarge blocksize
  2006-05-26 12:00 ` Andreas Dilger
@ 2006-06-05 13:13   ` Johann Lombardi
  2006-06-05 20:13     ` Andreas Dilger
  0 siblings, 1 reply; 6+ messages in thread
From: Johann Lombardi @ 2006-06-05 13:13 UTC (permalink / raw)
  To: Andreas Dilger, sho; +Cc: cmm, jitendra, ext2-devel, linux-kernel

On Fri, May 26, 2006 at 06:00:32AM -0600, Andreas Dilger wrote:
> On May 25, 2006  21:49 +0900, sho@tnes.nec.co.jp wrote:
> > @@ -1463,11 +1463,17 @@ static int ext3_fill_super (struct super
> > +	if (blocksize > PAGE_SIZE) {
> > +		printk(KERN_ERR "EXT3-fs: cannot mount filesystem with "
> > +		       "blocksize %u larger than PAGE_SIZE %u on %s\n",
> > +		       blocksize, PAGE_SIZE, sb->s_id);
> > +		goto failed_mount;
> > +	}
> > +
> >  	if (blocksize < EXT3_MIN_BLOCK_SIZE ||
> > -	    blocksize > EXT3_MAX_BLOCK_SIZE) {
> > +	    blocksize > EXT3_EXTENDED_MAX_BLOCK_SIZE) {
> 
> We may as well just change EXT3_MAX_BLOCK_SIZE to be 65536, because no other
> code uses this value.  It is already 65536 in the e2fsprogs.

AFAICS, ext3_dir_entry_2->rec_len will overflow with a 64kB blocksize.
Do you know how ext2 handles this?

Cheers,

Johann

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

* Re: [UPDATE][12/24]ext3 enlarge blocksize
  2006-05-25 12:49 sho
@ 2006-05-26 12:00 ` Andreas Dilger
  2006-06-05 13:13   ` Johann Lombardi
  0 siblings, 1 reply; 6+ messages in thread
From: Andreas Dilger @ 2006-05-26 12:00 UTC (permalink / raw)
  To: sho; +Cc: cmm, jitendra, ext2-devel, linux-kernel

At least part of this patch can be included into the patch series that
Mingming has posted to allow larger block sizes on architectures that
support it.  This doesn't need a separate COMPAT flag itself, since
older kernels will already refuse to mount a filesystem with large blocks.

On May 25, 2006  21:49 +0900, sho@tnes.nec.co.jp wrote:
> @@ -1463,11 +1463,17 @@ static int ext3_fill_super (struct super
> +	if (blocksize > PAGE_SIZE) {
> +		printk(KERN_ERR "EXT3-fs: cannot mount filesystem with "
> +		       "blocksize %u larger than PAGE_SIZE %u on %s\n",
> +		       blocksize, PAGE_SIZE, sb->s_id);
> +		goto failed_mount;
> +	}
> +
>  	if (blocksize < EXT3_MIN_BLOCK_SIZE ||
> -	    blocksize > EXT3_MAX_BLOCK_SIZE) {
> +	    blocksize > EXT3_EXTENDED_MAX_BLOCK_SIZE) {

We may as well just change EXT3_MAX_BLOCK_SIZE to be 65536, because no other
code uses this value.  It is already 65536 in the e2fsprogs.

> -		printk(KERN_ERR 
> -		       "EXT3-fs: Unsupported filesystem blocksize %d on %s.\n",
> -		       blocksize, sb->s_id);
> +		printk(KERN_ERR "EXT3-fs: Unsupported filesystem blocksize %d on %s.\n",
> +				 blocksize, sb->s_id);

I'm not sure why you changed the formatting of this message to now be longer
than 80 columns.

> diff -upNr -X linux-2.6.17-rc4/Documentation/dontdiff linux-2.6.17-rc4/include/linux/ext3_fs.h linux-2.6.17-rc4.tmp/include/linux/ext3_fs.h
> --- linux-2.6.17-rc4/include/linux/ext3_fs.h	2006-05-25 16:33:29.711659209 +0900
> +++ linux-2.6.17-rc4.tmp/include/linux/ext3_fs.h	2006-05-25 16:33:52.247791746 +0900
> @@ -86,6 +86,7 @@ struct statfs;
>   */
>  #define EXT3_MIN_BLOCK_SIZE		1024
>  #define	EXT3_MAX_BLOCK_SIZE		4096
> +#define        EXT3_EXTENDED_MAX_BLOCK_SIZE    65536
>  #define EXT3_MIN_BLOCK_LOG_SIZE		  10
>  #ifdef __KERNEL__
>  # define EXT3_BLOCK_SIZE(s)		((s)->s_blocksize)

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.


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

* [UPDATE][12/24]ext3 enlarge blocksize
@ 2006-05-25 12:49 sho
  2006-05-26 12:00 ` Andreas Dilger
  0 siblings, 1 reply; 6+ messages in thread
From: sho @ 2006-05-25 12:49 UTC (permalink / raw)
  To: adilger, cmm, jitendra; +Cc: ext2-devel, linux-kernel

Summary of this patch:
  [12/24] enlarge block size(ext3)
          - Add an incompat flag "EXT3_FEATURE_INCOMPAT_LARGE_BLOCK"
            which indicates that the filesystem is extended.

          - Allow block size till pagesize in ext3.

Signed-off-by: Takashi Sato sho@tnes.nec.co.jp
---
diff -upNr -X linux-2.6.17-rc4/Documentation/dontdiff linux-2.6.17-rc4/fs/ext3/super.c linux-2.6.17-rc4.tmp/fs/ext3/super.c
--- linux-2.6.17-rc4/fs/ext3/super.c	2006-05-25 16:33:29.710682647 +0900
+++ linux-2.6.17-rc4.tmp/fs/ext3/super.c	2006-05-25 16:33:52.245838621 +0900
@@ -1463,11 +1463,17 @@ static int ext3_fill_super (struct super
 	}
 	blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size);
 
+	if (blocksize > PAGE_SIZE) {
+		printk(KERN_ERR "EXT3-fs: cannot mount filesystem with "
+		       "blocksize %u larger than PAGE_SIZE %u on %s\n",
+		       blocksize, PAGE_SIZE, sb->s_id);
+		goto failed_mount;
+	}
+
 	if (blocksize < EXT3_MIN_BLOCK_SIZE ||
-	    blocksize > EXT3_MAX_BLOCK_SIZE) {
-		printk(KERN_ERR 
-		       "EXT3-fs: Unsupported filesystem blocksize %d on %s.\n",
-		       blocksize, sb->s_id);
+	    blocksize > EXT3_EXTENDED_MAX_BLOCK_SIZE) {
+		printk(KERN_ERR "EXT3-fs: Unsupported filesystem blocksize %d on %s.\n",
+				 blocksize, sb->s_id);
 		goto failed_mount;
 	}
 
diff -upNr -X linux-2.6.17-rc4/Documentation/dontdiff linux-2.6.17-rc4/include/linux/ext2_fs.h linux-2.6.17-rc4.tmp/include/linux/ext2_fs.h
--- linux-2.6.17-rc4/include/linux/ext2_fs.h	2006-03-20 14:53:29.000000000 +0900
+++ linux-2.6.17-rc4.tmp/include/linux/ext2_fs.h	2006-05-25 16:33:52.246815183 +0900
@@ -91,6 +91,7 @@ static inline struct ext2_sb_info *EXT2_
  */
 #define EXT2_MIN_BLOCK_SIZE		1024
 #define	EXT2_MAX_BLOCK_SIZE		4096
+#define        EXT2_EXTENDED_MAX_BLOCK_SIZE    65536
 #define EXT2_MIN_BLOCK_LOG_SIZE		  10
 #ifdef __KERNEL__
 # define EXT2_BLOCK_SIZE(s)		((s)->s_blocksize)
@@ -471,11 +472,13 @@ struct ext2_super_block {
 #define EXT3_FEATURE_INCOMPAT_RECOVER		0x0004
 #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV	0x0008
 #define EXT2_FEATURE_INCOMPAT_META_BG		0x0010
+#define EXT2_FEATURE_INCOMPAT_HUGE_FS		0x0080
 #define EXT2_FEATURE_INCOMPAT_ANY		0xffffffff
 
 #define EXT2_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
 #define EXT2_FEATURE_INCOMPAT_SUPP	(EXT2_FEATURE_INCOMPAT_FILETYPE| \
-					 EXT2_FEATURE_INCOMPAT_META_BG)
+					 EXT2_FEATURE_INCOMPAT_META_BG| \
+					 EXT2_FEATURE_INCOMPAT_HUGE_FS)
 #define EXT2_FEATURE_RO_COMPAT_SUPP	(EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
 					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
 					 EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
diff -upNr -X linux-2.6.17-rc4/Documentation/dontdiff linux-2.6.17-rc4/include/linux/ext3_fs.h linux-2.6.17-rc4.tmp/include/linux/ext3_fs.h
--- linux-2.6.17-rc4/include/linux/ext3_fs.h	2006-05-25 16:33:29.711659209 +0900
+++ linux-2.6.17-rc4.tmp/include/linux/ext3_fs.h	2006-05-25 16:33:52.247791746 +0900
@@ -86,6 +86,7 @@ struct statfs;
  */
 #define EXT3_MIN_BLOCK_SIZE		1024
 #define	EXT3_MAX_BLOCK_SIZE		4096
+#define        EXT3_EXTENDED_MAX_BLOCK_SIZE    65536
 #define EXT3_MIN_BLOCK_LOG_SIZE		  10
 #ifdef __KERNEL__
 # define EXT3_BLOCK_SIZE(s)		((s)->s_blocksize)
@@ -563,11 +564,13 @@ static inline struct ext3_inode_info *EX
 #define EXT3_FEATURE_INCOMPAT_RECOVER		0x0004 /* Needs recovery */
 #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV	0x0008 /* Journal device */
 #define EXT3_FEATURE_INCOMPAT_META_BG		0x0010
+#define EXT3_FEATURE_INCOMPAT_HUGE_FS		0x0080
 
 #define EXT3_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
 #define EXT3_FEATURE_INCOMPAT_SUPP	(EXT3_FEATURE_INCOMPAT_FILETYPE| \
 					 EXT3_FEATURE_INCOMPAT_RECOVER| \
-					 EXT3_FEATURE_INCOMPAT_META_BG)
+					 EXT3_FEATURE_INCOMPAT_META_BG| \
+					 EXT3_FEATURE_INCOMPAT_HUGE_FS)
 #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)




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

end of thread, other threads:[~2006-06-05 20:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-30 12:24 [UPDATE][12/24]ext3 enlarge blocksize sho
2006-05-30 19:12 ` Andreas Dilger
  -- strict thread matches above, loose matches on Subject: below --
2006-05-25 12:49 sho
2006-05-26 12:00 ` Andreas Dilger
2006-06-05 13:13   ` Johann Lombardi
2006-06-05 20:13     ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).