Whamcloud - gitweb
LU-12353 ldiskfs: speedup quota journalling
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel7.6 / ext4-misc.patch
1 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ext4.h
2 ===================================================================
3 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/ext4.h
4 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ext4.h
5 @@ -1427,6 +1427,8 @@ static inline void ext4_clear_state_flag
6  
7  #define NEXT_ORPHAN(inode) EXT4_I(inode)->i_dtime
8  
9 +#define JOURNAL_START_HAS_3ARGS        1
10 +
11  /*
12   * Codes for operating systems
13   */
14 @@ -2612,6 +2614,11 @@ struct ext4_extent;
15  
16  extern int ext4_ext_tree_init(handle_t *handle, struct inode *);
17  extern int ext4_ext_writepage_trans_blocks(struct inode *, int);
18 +extern struct buffer_head *ext4_read_inode_bitmap(struct super_block *sb,
19 +                                                 ext4_group_t block_group);
20 +extern struct buffer_head *ext4_append(handle_t *handle,
21 +                                      struct inode *inode,
22 +                                      ext4_lblk_t *block);
23  extern int ext4_ext_index_trans_blocks(struct inode *inode, int extents);
24                                        int chunk);
25  extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
26 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/namei.c
27 ===================================================================
28 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/namei.c
29 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/namei.c
30 @@ -48,7 +48,7 @@
31  #define NAMEI_RA_BLOCKS  4
32  #define NAMEI_RA_SIZE       (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS)
33  
34 -static struct buffer_head *ext4_append(handle_t *handle,
35 +struct buffer_head *ext4_append(handle_t *handle,
36                                         struct inode *inode,
37                                         ext4_lblk_t *block)
38  {
39 @@ -155,6 +155,7 @@ static struct buffer_head *__ext4_read_d
40         }
41         return bh;
42  }
43 +EXPORT_SYMBOL(ext4_append);
44  
45  #ifndef assert
46  #define assert(test) J_ASSERT(test)
47 @@ -2210,7 +2211,7 @@ out:
48   * DIR_NLINK feature is set if 1) nlinks > EXT4_LINK_MAX or 2) nlinks == 2,
49   * since this indicates that nlinks count was previously 1.
50   */
51 -static void ext4_inc_count(handle_t *handle, struct inode *inode)
52 +void ext4_inc_count(handle_t *handle, struct inode *inode)
53  {
54         inc_nlink(inode);
55         if (is_dx(inode) && inode->i_nlink > 1) {
56 @@ -2222,16 +2223,18 @@ static void ext4_inc_count(handle_t *han
57                 }
58         }
59  }
60 +EXPORT_SYMBOL(ext4_inc_count);
61  
62  /*
63   * If a directory had nlink == 1, then we should let it be 1. This indicates
64   * directory has >EXT4_LINK_MAX subdirs.
65   */
66 -static void ext4_dec_count(handle_t *handle, struct inode *inode)
67 +void ext4_dec_count(handle_t *handle, struct inode *inode)
68  {
69         if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
70                 drop_nlink(inode);
71  }
72 +EXPORT_SYMBOL(ext4_dec_count);
73  
74  
75  static int ext4_add_nondir(handle_t *handle,
76 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ialloc.c
77 ===================================================================
78 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/ialloc.c
79 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ialloc.c
80 @@ -111,7 +111,7 @@ void ext4_end_bitmap_read(struct buffer_
81   *
82   * Return buffer_head of bitmap on success or NULL.
83   */
84 -static struct buffer_head *
85 +struct buffer_head *
86  ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
87  {
88         struct ext4_group_desc *desc;
89 @@ -191,6 +191,7 @@ verify:
90         set_buffer_verified(bh);
91         return bh;
92  }
93 +EXPORT_SYMBOL(ext4_read_inode_bitmap);
94  
95  /*
96   * NOTE! When we get the inode, we're the only people
97 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/inode.c
98 ===================================================================
99 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/inode.c
100 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/inode.c
101 @@ -5281,3 +5281,18 @@ out:
102         sb_end_pagefault(inode->i_sb);
103         return ret;
104  }
105 +EXPORT_SYMBOL(ext4_map_blocks);
106 +EXPORT_SYMBOL(ext4_truncate);
107 +EXPORT_SYMBOL(ext4_iget);
108 +EXPORT_SYMBOL(ext4_bread);
109 +EXPORT_SYMBOL(ext4_itable_unused_count);
110 +EXPORT_SYMBOL(ext4_force_commit);
111 +EXPORT_SYMBOL(ext4_mark_inode_dirty);
112 +EXPORT_SYMBOL(ext4_get_group_desc);
113 +EXPORT_SYMBOL(__ext4_journal_get_write_access);
114 +EXPORT_SYMBOL(__ext4_journal_start_sb);
115 +EXPORT_SYMBOL(__ext4_journal_stop);
116 +EXPORT_SYMBOL(__ext4_handle_dirty_metadata);
117 +EXPORT_SYMBOL(__ext4_std_error);
118 +EXPORT_SYMBOL(ext4fs_dirhash);
119 +EXPORT_SYMBOL(ext4_get_inode_loc);
120 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/mballoc.c
121 ===================================================================
122 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/mballoc.c
123 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/mballoc.c
124 @@ -5281,7 +5281,6 @@ out:
125                                 void *buddy, void *bitmap, ext4_group_t group)
126  {
127         struct ext4_group_info *grp = ext4_get_group_info(sb, group);
128 -       struct ext4_sb_info *sbi = EXT4_SB(sb);
129         ext4_grpblk_t max = EXT4_CLUSTERS_PER_GROUP(sb);
130         ext4_grpblk_t i = 0;
131         ext4_grpblk_t first;