Whamcloud - gitweb
e056c7c21f792c02404e66303c0e98c4993fc67b
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel6.4 / ext4-max-dir-size-options.patch
1 diff -urpN linux-stage.orig/fs/ext4/super.c linux-stage/fs/ext4/super.c
2 --- linux-stage.orig/fs/ext4/super.c    2013-05-13 09:35:17.628478645 -0400
3 +++ linux-stage/fs/ext4/super.c 2013-05-13 09:46:08.062358974 -0400
4 @@ -1268,8 +1268,8 @@ enum {
5         Opt_mballoc, Opt_bigendian_extents, Opt_force_over_128tb,
6         Opt_extents, Opt_noextents,
7         Opt_no_mbcache,
8 -       Opt_discard, Opt_nodiscard,
9 -       Opt_init_itable, Opt_noinit_itable,
10 +       Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
11 +       Opt_max_dir_size_kb,
12  };
13  
14  static const match_table_t tokens = {
15 @@ -1350,6 +1350,7 @@ static const match_table_t tokens = {
16         {Opt_init_itable, "init_itable=%u"},
17         {Opt_init_itable, "init_itable"},
18         {Opt_noinit_itable, "noinit_itable"},
19 +       {Opt_max_dir_size_kb, "max_dir_size_kb=%u"},
20         {Opt_err, NULL},
21  };
22  
23 @@ -1736,6 +1737,13 @@ set_qf_format:
24                 case Opt_nodelalloc:
25                         clear_opt(sbi->s_mount_opt, DELALLOC);
26                         break;
27 +               case Opt_max_dir_size_kb:
28 +                       if (match_int(&args[0], &option))
29 +                               return 0;
30 +                       if (option < 0)
31 +                               return 0;
32 +                       sbi->s_max_dir_size = option * 1024;
33 +                       break;
34                 case Opt_stripe:
35                         if (match_int(&args[0], &option))
36                                 return 0;