mirror of https://lore.kernel.org/lkml/
 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
* [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

all inboxes | Powered by JetHome®