Whamcloud - gitweb
LU-2880 ldiskfs: Added mount option to enable dirdata.
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / sles11sp2 / 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 11:04:01.000000000 -0400
3 +++ linux-stage/fs/ext4/super.c 2013-05-13 11:05:23.000000000 -0400
4 @@ -1369,6 +1369,7 @@ enum {
5         Opt_extents, Opt_noextents,
6         Opt_no_mbcache,
7         Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
8 +       Opt_max_dir_size_kb,
9  };
10  
11  static const match_table_t tokens = {
12 @@ -1453,6 +1454,7 @@ static const match_table_t tokens = {
13         {Opt_init_itable, "init_itable=%u"},
14         {Opt_init_itable, "init_itable"},
15         {Opt_noinit_itable, "noinit_itable"},
16 +       {Opt_max_dir_size_kb, "max_dir_size_kb=%u"},
17         {Opt_err, NULL},
18  };
19  
20 @@ -1871,6 +1873,13 @@ set_qf_format:
21                 case Opt_nomblk_io_submit:
22                         clear_opt(sb, MBLK_IO_SUBMIT);
23                         break;
24 +               case Opt_max_dir_size_kb:
25 +                       if (match_int(&args[0], &option))
26 +                               return 0;
27 +                       if (option < 0)
28 +                               return 0;
29 +                       sbi->s_max_dir_size = option * 1024;
30 +                       break;
31                 case Opt_stripe:
32                         if (match_int(&args[0], &option))
33                                 return 0;