Opt_grpquota,
- Opt_extents, Opt_noextents, Opt_extdebug,
+ Opt_extents, Opt_noextents, Opt_bigendian_extents, Opt_extdebug,
- Opt_mballoc, Opt_nomballoc, Opt_stripe,
+ Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_maxdirsize
};
@@ -766,6 +768,7 @@ static match_table_t tokens = {
/*
* The only special thing we need to do here is to make sure that all
* journal_stop calls result in the superblock being marked dirty, so
-@@ -703,7 +705,7 @@ enum {
- Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
+@@ -705,7 +707,7 @@ enum {
Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
+ Opt_grpquota,
- Opt_extents, Opt_noextents, Opt_extdebug,
+ Opt_extents, Opt_noextents, Opt_bigendian_extents, Opt_extdebug,
- Opt_mballoc, Opt_nomballoc, Opt_stripe,
- Opt_grpquota
+ Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_maxdirsize
};
-@@ -762,6 +764,7 @@ static match_table_t tokens = {
- {Opt_iopen_nopriv, "iopen_nopriv"},
+
+@@ -764,6 +766,7 @@ static match_table_t tokens = {
+ {Opt_barrier, "barrier=%u"},
{Opt_extents, "extents"},
{Opt_noextents, "noextents"},
+ {Opt_bigendian_extents, "bigendian_extents"},
{Opt_extdebug, "extdebug"},
- {Opt_barrier, "barrier=%u"},
{Opt_mballoc, "mballoc"},
-@@ -1122,6 +1125,9 @@ clear_qf_name:
+ {Opt_nomballoc, "nomballoc"},
+@@ -1124,6 +1127,10 @@ clear_qf_name:
case Opt_noextents:
clear_opt (sbi->s_mount_opt, EXTENTS);
break;
+ case Opt_bigendian_extents:
+ bigendian_extents = 1;
+ break;
++
case Opt_extdebug:
set_opt (sbi->s_mount_opt, EXTDEBUG);
break;
-@@ -2052,6 +2058,16 @@ static int ext3_fill_super (struct super
+@@ -2087,6 +2094,16 @@ static int ext3_fill_super (struct super
NULL, 0))
goto failed_mount;
+#ifdef __BIG_ENDIAN
+ if (bigendian_extents == 0) {
+ printk(KERN_ERR "EXT3-fs: e2fsck is not guaranteed to work "
-+ "correctly on the filesystem if EXTENTS feature is "
-+ "used on big-endian systems. Use \"bigendian_extents\" "
-+ "mount option to override.\n");
++ "correctly on the filesystem if EXTENTS feature is "
++ "used on big-endian systems. Use \"bigendian_extents\" "
++ "mount option to override.\n");
+ goto failed_mount;
+ }
+#endif
Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
+- Opt_grpquota
++ Opt_grpquota,
+ Opt_extents, Opt_noextents, Opt_extdebug,
- Opt_grpquota
};
@@ -729,6 +733,9 @@ static match_table_t tokens = {
{Opt_iopen, "iopen"},
{Opt_noiopen, "noiopen"},
{Opt_iopen_nopriv, "iopen_nopriv"},
+ {Opt_barrier, "barrier=%u"},
+ {Opt_extents, "extents"},
+ {Opt_noextents, "noextents"},
+ {Opt_extdebug, "extdebug"},
- {Opt_barrier, "barrier=%u"},
{Opt_err, NULL},
{Opt_resize, "resize"},
@@ -1070,6 +1077,15 @@ clear_qf_name:
default:
printk (KERN_ERR
"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1800,6 +1816,7 @@ static int ext3_fill_super (struct super
+@@ -1800,6 +1816,8 @@ static int ext3_fill_super (struct super
percpu_counter_mod(&sbi->s_dirs_counter,
ext3_count_dirs(sb));
+ ext3_ext_init(sb);
++
lock_kernel();
return 0;
Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
Opt_grpquota,
Opt_extents, Opt_noextents, Opt_bigendian_extents, Opt_extdebug,
-- Opt_mballoc, Opt_nomballoc, Opt_stripe,
-+ Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_force_over_8tb,
+- Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_maxdirsize
++ Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_maxdirsize, Opt_force_over_8tb,
};
static match_table_t tokens = {
-@@ -779,6 +781,7 @@ static match_table_t tokens = {
+@@ -779,5 +781,6 @@ static match_table_t tokens = {
{Opt_mballoc, "mballoc"},
{Opt_nomballoc, "nomballoc"},
{Opt_stripe, "stripe=%u"},
+ {Opt_force_over_8tb, "force_over_8tb"},
- {Opt_err, NULL},
{Opt_resize, "resize"},
};
@@ -1157,6 +1160,9 @@ clear_qf_name:
return 0;
- sbi->s_stripe = option;
+ sbi->s_max_dir_size = option;
break;
+ case Opt_force_over_8tb:
+ force_over_8tb = 1;
static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
unsigned long journal_devnum);
static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
-@@ -708,7 +710,7 @@ enum {
+@@ -710,7 +710,7 @@ enum {
Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
+ Opt_grpquota,
Opt_extents, Opt_noextents, Opt_bigendian_extents, Opt_extdebug,
- Opt_mballoc, Opt_nomballoc, Opt_stripe,
-- Opt_grpquota
-+ Opt_grpquota, Opt_force_over_8tb
+- Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_maxdirsize
++ Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_maxdirsize, Opt_force_over_8tb,
};
static match_table_t tokens = {
-@@ -771,6 +773,7 @@ static match_table_t tokens = {
+@@ -773,6 +773,7 @@ static match_table_t tokens = {
{Opt_mballoc, "mballoc"},
{Opt_nomballoc, "nomballoc"},
{Opt_stripe, "stripe=%u"},
+ {Opt_force_over_8tb, "force_over_8tb"},
- {Opt_err, NULL},
{Opt_resize, "resize"},
- };
-@@ -1145,6 +1148,9 @@ clear_qf_name:
+ {Opt_maxdirsize, "maxdirsize=%u"},
+ {Opt_err, NULL}
+@@ -1156,6 +1157,9 @@ clear_qf_name:
return 0;
- sbi->s_stripe = option;
+ sbi->s_max_dir_size = option;
break;
+ case Opt_force_over_8tb:
+ force_over_8tb = 1;
default:
printk (KERN_ERR
"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -2231,6 +2237,17 @@ static int ext3_fill_super (struct super
+@@ -2242,6 +2246,17 @@ static int ext3_fill_super (struct super
goto failed_mount;
}
-+ if (le32_to_cpu(es->s_blocks_count) >
++ if (le32_to_cpu(es->s_blocks_count) >
+ ((0x80000000000ULL >> sb->s_blocksize_bits) - 1)) {
+ if (force_over_8tb == 0) {
+ printk(KERN_ERR "EXT3-fs does not support filesystems "
-+ "greater than 8TB and can cause data corruption."
-+ "Use \"force_over_8tb\" mount option to override."
-+ "\n");
++ "greater than 8TB and can cause data corruption."
++ "Use \"force_over_8tb\" mount option to override."
++ "\n");
+ goto failed_mount;
+ }
+ }
-Index: linux-2.6.18-92.1.17/fs/ext3/ialloc.c
+Index: linux-stage/fs/ext3/ialloc.c
===================================================================
---- linux-2.6.18-92.1.17.orig/fs/ext3/ialloc.c
-+++ linux-2.6.18-92.1.17/fs/ext3/ialloc.c
-@@ -521,12 +521,15 @@ struct inode *ext3_new_inode(handle_t *h
+--- linux-stage.orig/fs/ext3/ialloc.c
++++ linux-stage/fs/ext3/ialloc.c
+@@ -521,12 +521,15 @@ struct inode *ext3_new_inode(handle_t
return ERR_PTR(-EPERM);
sb = dir->i_sb;
es = sbi->s_es;
if (goal) {
group = (goal - 1) / EXT3_INODES_PER_GROUP(sb);
-Index: linux-2.6.18-92.1.17/fs/ext3/super.c
+Index: linux-stage/fs/ext3/super.c
===================================================================
---- linux-2.6.18-92.1.17.orig/fs/ext3/super.c
-+++ linux-2.6.18-92.1.17/fs/ext3/super.c
+--- linux-stage.orig/fs/ext3/super.c
++++ linux-stage/fs/ext3/super.c
@@ -45,6 +45,12 @@
#include "namei.h"
#include "group.h"
static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
unsigned long journal_devnum);
static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
-@@ -439,6 +445,7 @@ static void ext3_put_super (struct super
+@@ -444,6 +450,7 @@ static void ext3_put_super (struct su
}
if (sbi->s_mmp_tsk)
kthread_stop(sbi->s_mmp_tsk);
if (sbi->s_dev_proc) {
remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3);
sbi->s_dev_proc = NULL;
-@@ -1854,6 +1861,45 @@ failed:
+@@ -703,7 +710,7 @@ enum {
+ Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
+ Opt_grpquota,
+ Opt_extents, Opt_noextents, Opt_extdebug,
+- Opt_mballoc, Opt_nomballoc, Opt_stripe,
++ Opt_mballoc, Opt_nomballoc, Opt_stripe, Opt_maxdirsize
+ };
+
+ static match_table_t tokens = {
+@@ -762,8 +769,9 @@ static match_table_t tokens = {
+ {Opt_mballoc, "mballoc"},
+ {Opt_nomballoc, "nomballoc"},
+ {Opt_stripe, "stripe=%u"},
+- {Opt_err, NULL},
+ {Opt_resize, "resize"},
++ {Opt_maxdirsize, "maxdirsize=%u"},
++ {Opt_err, NULL}
+ };
+
+ static ext3_fsblk_t get_sb_block(void **data)
+@@ -1128,6 +1136,13 @@ clear_qf_name:
+ return 0;
+ sbi->s_stripe = option;
+ break;
++ case Opt_maxdirsize:
++ if (match_int(&args[0], &option))
++ return 0;
++ if (option <= 0)
++ return 0;
++ sbi->s_max_dir_size = option;
++ break;
+ default:
+ printk (KERN_ERR
+ "EXT3-fs: Unrecognized mount option \"%s\" "
+@@ -1875,6 +1890,45 @@ failed:
return 1;
}
static int ext3_fill_super (struct super_block *sb, void *data, int silent)
{
-@@ -1875,6 +1921,7 @@ static int ext3_fill_super (struct super
+@@ -1896,6 +1950,7 @@ static int ext3_fill_super (struct su
int i;
int needs_recovery;
__le32 features;
sbi = kmalloc(sizeof(*sbi), GFP_KERNEL);
if (!sbi)
-@@ -1903,6 +1950,23 @@ static int ext3_fill_super (struct super
+@@ -1924,6 +1979,23 @@ static int ext3_fill_super (struct su
unlock_kernel();
+ proc = create_proc_entry(EXT3_MAX_DIR_SIZE_NAME,
+ S_IFREG | S_IRUGO | S_IWUSR, sbi->s_dev_proc);
+ if (proc == NULL) {
-+ printk(KERN_ERR "EXT3-fs: unable to create %s\n",
++ printk(KERN_ERR "EXT3-fs: unable to create %s\n",
+ EXT3_MAX_DIR_SIZE_NAME);
+ remove_proc_entry(EXT3_MAX_DIR_SIZE_NAME, sbi->s_dev_proc);
+ remove_proc_entry(sb->s_id, proc_root_ext3);
blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE);
if (!blocksize) {
printk(KERN_ERR "EXT3-fs: unable to set blocksize\n");
-@@ -2338,6 +2402,7 @@ failed_mount:
+@@ -2361,6 +2433,7 @@ failed_mount:
ext3_blkdev_remove(sbi);
brelse(bh);
out_fail:
if (sbi->s_dev_proc) {
remove_proc_entry(sbi->s_dev_proc->name, proc_root_ext3);
sbi->s_dev_proc = NULL;
-Index: linux-2.6.18-92.1.17/include/linux/ext3_fs_sb.h
+Index: linux-stage/include/linux/ext3_fs_sb.h
===================================================================
---- linux-2.6.18-92.1.17.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.18-92.1.17/include/linux/ext3_fs_sb.h
+--- linux-stage.orig/include/linux/ext3_fs_sb.h
++++ linux-stage/include/linux/ext3_fs_sb.h
@@ -132,6 +132,8 @@ struct ext3_sb_info {
unsigned long s_mb_last_group;
unsigned long s_mb_last_start;
===================================================================
--- linux-2.6.16.46-0.14.orig/fs/ext3/super.c
+++ linux-2.6.16.46-0.14/fs/ext3/super.c
-@@ -685,6 +685,7 @@ enum {
- Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
+@@ -681,6 +681,7 @@ enum {
Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
+ Opt_grpquota,
Opt_extents, Opt_noextents, Opt_extdebug,
+ Opt_mballoc, Opt_nomballoc, Opt_stripe,
- Opt_grpquota
};
-
+
+ static match_table_t tokens = {
@@ -740,6 +741,9 @@ static match_table_t tokens = {
+ {Opt_extents, "extents"},
{Opt_noextents, "noextents"},
{Opt_extdebug, "extdebug"},
- {Opt_barrier, "barrier=%u"},
+ {Opt_mballoc, "mballoc"},
+ {Opt_nomballoc, "nomballoc"},
+ {Opt_stripe, "stripe=%u"},
{Opt_err, NULL},
{Opt_resize, "resize"},
};
-@@ -1089,6 +1093,19 @@ clear_qf_name:
+@@ -1077,6 +1081,19 @@ clear_qf_name:
case Opt_extdebug:
set_opt (sbi->s_mount_opt, EXTDEBUG);
break;
default:
printk (KERN_ERR
"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1820,6 +1837,7 @@ static int ext3_fill_super (struct super
+@@ -1858,7 +1858,7 @@ static int ext3_fill_super (struct super
ext3_count_dirs(sb));
ext3_ext_init(sb);
+-
+ ext3_mb_init(sb, needs_recovery);
lock_kernel();
return 0;