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 11:04:01.000000000 -0400 +++ linux-stage/fs/ext4/super.c 2013-05-13 11:05:23.000000000 -0400 @@ -1369,6 +1369,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 = { @@ -1453,6 +1454,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}, }; @@ -1871,6 +1873,13 @@ set_qf_format: case Opt_nomblk_io_submit: clear_opt(sb, MBLK_IO_SUBMIT); 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;