Whamcloud - gitweb
edb572641fb75e6a391981877fe2a1ac5e5d7c55
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel6.3 / 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 10:29:34.125478791 -0400
3 +++ linux-stage/fs/ext4/super.c 2013-05-13 10:31:59.800359005 -0400
4 @@ -1264,8 +1264,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_inode_table, Opt_noinit_inode_table,
10 +       Opt_discard, Opt_nodiscard, Opt_init_inode_table, Opt_noinit_inode_table,
11 +       Opt_max_dir_size_kb,
12  };
13  
14  static const match_table_t tokens = {
15 @@ -1346,6 +1346,7 @@ static const match_table_t tokens = {
16         {Opt_init_inode_table, "init_itable=%u"},
17         {Opt_init_inode_table, "init_itable"},
18         {Opt_noinit_inode_table, "noinit_itable"},
19 +       {Opt_max_dir_size_kb, "max_dir_size_kb=%u"},
20         {Opt_err, NULL},
21  };
22  
23 @@ -1732,6 +1733,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;