diff -urpN linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c --- linux-stage.orig/fs/ext4/super.c 2013-05-13 09:35:17.628478645 -0400 +++ linux-stage/fs/ext4/super.c 2013-05-13 09:46:08.062358974 -0400 @@ -1268,6 +1268,7 @@ enum { Opt_extents, Opt_noextents, Opt_no_mbcache, Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable, + Opt_max_dir_size_kb, }; static const match_table_t tokens = { @@ -1350,6 +1350,7 @@ static const match_table_t tokens = { {Opt_init_itable, "init_itable=%u"}, {Opt_init_itable, "init_itable"}, {Opt_noinit_itable, "noinit_itable"}, + {Opt_max_dir_size_kb, "max_dir_size_kb=%u"}, {Opt_err, NULL}, }; @@ -1736,6 +1737,13 @@ set_qf_format: case Opt_nodelalloc: clear_opt(sbi->s_mount_opt, DELALLOC); break; + case Opt_max_dir_size_kb: + if (match_int(&args[0], &option)) + return 0; + if (option < 0) + return 0; + sbi->s_max_dir_size = option * 1024; + break; case Opt_stripe: if (match_int(&args[0], &option)) return 0;