Whamcloud - gitweb
LU-15635 ldiskfs: Interface change fix server v5.10
[fs/lustre-release.git] / ldiskfs / kernel_patches / patches / rhel7.7 / 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,13 @@ 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 void ext4_inc_count(handle_t *handle, struct inode *inode);
21 +extern void ext4_dec_count(handle_t *handle, struct inode *inode);
22 +extern struct buffer_head *ext4_append(handle_t *handle,
23 +                                      struct inode *inode,
24 +                                      ext4_lblk_t *block);
25  extern int ext4_ext_index_trans_blocks(struct inode *inode, int extents);
26                                        int chunk);
27  extern int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
28 Index: linux-3.10.0-1062.el7.x86_64/fs/ext4/namei.c
29 ===================================================================
30 --- linux-3.10.0-1062.el7.x86_64.orig/fs/ext4/namei.c
31 +++ linux-3.10.0-1062.el7.x86_64/fs/ext4/namei.c
32 @@ -48,7 +48,7 @@
33  #define NAMEI_RA_BLOCKS  4
34  #define NAMEI_RA_SIZE       (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS)
35  
36 -static struct buffer_head *ext4_append(handle_t *handle,
37 +struct buffer_head *ext4_append(handle_t *handle,
38                                         struct inode *inode,
39                                         ext4_lblk_t *block)
40  {
41 @@ -156,6 +156,7 @@ static struct buffer_head *__ext4_read_d
42         }
43         return bh;
44  }
45 +EXPORT_SYMBOL(ext4_append);
46  
47  #ifndef assert
48  #define assert(test) J_ASSERT(test)
49 @@ -2233,23 +2234,25 @@ out:
50   * for checking S_ISDIR(inode) (since the INODE_INDEX feature will not be set
51   * on regular files) and to avoid creating huge/slow non-HTREE directories.
52  */
53 -static void ext4_inc_count(handle_t *handle, struct inode *inode)
54 +void ext4_inc_count(handle_t *handle, struct inode *inode)
55  {
56         inc_nlink(inode);
57         if (is_dx(inode) &&
58             (inode->i_nlink > EXT4_LINK_MAX || inode->i_nlink == 2))
59                 set_nlink(inode, 1);
60  }
61 +EXPORT_SYMBOL(ext4_inc_count);
62  
63  /*
64   * If a directory had nlink == 1, then we should let it be 1. This indicates
65   * directory has >EXT4_LINK_MAX subdirs.
66   */
67 -static void ext4_dec_count(handle_t *handle, struct inode *inode)
68 +void ext4_dec_count(handle_t *handle, struct inode *inode)
69  {
70         if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
71                 drop_nlink(inode);
72  }
73 +EXPORT_SYMBOL(ext4_dec_count);
74  
75  
76  static int ext4_add_nondir(handle_t *handle,
77 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ialloc.c
78 ===================================================================
79 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/ialloc.c
80 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ialloc.c
81 @@ -111,7 +111,7 @@ void ext4_end_bitmap_read(struct buffer_
82   *
83   * Return buffer_head of bitmap on success or NULL.
84   */
85 -static struct buffer_head *
86 +struct buffer_head *
87  ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
88  {
89         struct ext4_group_desc *desc;
90 @@ -191,6 +191,7 @@ verify:
91         set_buffer_verified(bh);
92         return bh;
93  }
94 +EXPORT_SYMBOL(ext4_read_inode_bitmap);
95  
96  /*
97   * NOTE! When we get the inode, we're the only people
98 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/inode.c
99 ===================================================================
100 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/inode.c
101 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/inode.c
102 @@ -5281,3 +5281,18 @@ out:
103         sb_end_pagefault(inode->i_sb);
104         return ret;
105  }
106 +EXPORT_SYMBOL(ext4_map_blocks);
107 +EXPORT_SYMBOL(ext4_truncate);
108 +EXPORT_SYMBOL(ext4_iget);
109 +EXPORT_SYMBOL(ext4_bread);
110 +EXPORT_SYMBOL(ext4_itable_unused_count);
111 +EXPORT_SYMBOL(ext4_force_commit);
112 +EXPORT_SYMBOL(ext4_mark_inode_dirty);
113 +EXPORT_SYMBOL(ext4_get_group_desc);
114 +EXPORT_SYMBOL(__ext4_journal_get_write_access);
115 +EXPORT_SYMBOL(__ext4_journal_start_sb);
116 +EXPORT_SYMBOL(__ext4_journal_stop);
117 +EXPORT_SYMBOL(__ext4_handle_dirty_metadata);
118 +EXPORT_SYMBOL(__ext4_std_error);
119 +EXPORT_SYMBOL(ext4fs_dirhash);
120 +EXPORT_SYMBOL(ext4_get_inode_loc);
121 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/mballoc.c
122 ===================================================================
123 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/mballoc.c
124 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/mballoc.c
125 @@ -5281,7 +5281,6 @@ out:
126                                 void *buddy, void *bitmap, ext4_group_t group)
127  {
128         struct ext4_group_info *grp = ext4_get_group_info(sb, group);
129 -       struct ext4_sb_info *sbi = EXT4_SB(sb);
130         ext4_grpblk_t max = EXT4_CLUSTERS_PER_GROUP(sb);
131         ext4_grpblk_t i = 0;
132         ext4_grpblk_t first;