Whamcloud - gitweb
LU-16847 ldiskfs: do not copy ldiskfs_chunk_trans_blocks
[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,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-123.13.2.el7.x86_64/fs/ext4/namei.c
29 ===================================================================
30 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/namei.c
31 +++ linux-3.10.0-123.13.2.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 @@ -155,6 +155,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 @@ -2210,7 +2211,7 @@ out:
50   * DIR_NLINK feature is set if 1) nlinks > EXT4_LINK_MAX or 2) nlinks == 2,
51   * since this indicates that nlinks count was previously 1.
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) && inode->i_nlink > 1) {
58 @@ -2222,16 +2223,18 @@ static void ext4_inc_count(handle_t *han
59                 }
60         }
61  }
62 +EXPORT_SYMBOL(ext4_inc_count);
63  
64  /*
65   * If a directory had nlink == 1, then we should let it be 1. This indicates
66   * directory has >EXT4_LINK_MAX subdirs.
67   */
68 -static void ext4_dec_count(handle_t *handle, struct inode *inode)
69 +void ext4_dec_count(handle_t *handle, struct inode *inode)
70  {
71         if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
72                 drop_nlink(inode);
73  }
74 +EXPORT_SYMBOL(ext4_dec_count);
75  
76  
77  static int ext4_add_nondir(handle_t *handle,
78 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ialloc.c
79 ===================================================================
80 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/ialloc.c
81 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/ialloc.c
82 @@ -111,7 +111,7 @@ void ext4_end_bitmap_read(struct buffer_
83   *
84   * Return buffer_head of bitmap on success or NULL.
85   */
86 -static struct buffer_head *
87 +struct buffer_head *
88  ext4_read_inode_bitmap(struct super_block *sb, ext4_group_t block_group)
89  {
90         struct ext4_group_desc *desc;
91 @@ -191,6 +191,7 @@ verify:
92         set_buffer_verified(bh);
93         return bh;
94  }
95 +EXPORT_SYMBOL(ext4_read_inode_bitmap);
96  
97  /*
98   * NOTE! When we get the inode, we're the only people
99 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/inode.c
100 ===================================================================
101 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/inode.c
102 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/inode.c
103 @@ -5281,3 +5281,19 @@ out:
104         sb_end_pagefault(inode->i_sb);
105         return ret;
106  }
107 +EXPORT_SYMBOL(ext4_map_blocks);
108 +EXPORT_SYMBOL(ext4_truncate);
109 +EXPORT_SYMBOL(ext4_iget);
110 +EXPORT_SYMBOL(ext4_bread);
111 +EXPORT_SYMBOL(ext4_itable_unused_count);
112 +EXPORT_SYMBOL(ext4_force_commit);
113 +EXPORT_SYMBOL(ext4_mark_inode_dirty);
114 +EXPORT_SYMBOL(ext4_get_group_desc);
115 +EXPORT_SYMBOL(__ext4_journal_get_write_access);
116 +EXPORT_SYMBOL(__ext4_journal_start_sb);
117 +EXPORT_SYMBOL(__ext4_journal_stop);
118 +EXPORT_SYMBOL(__ext4_handle_dirty_metadata);
119 +EXPORT_SYMBOL(__ext4_std_error);
120 +EXPORT_SYMBOL(ext4fs_dirhash);
121 +EXPORT_SYMBOL(ext4_get_inode_loc);
122 Index: linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/mballoc.c
123 ===================================================================
124 --- linux-3.10.0-123.13.2.el7.x86_64.orig/fs/ext4/mballoc.c
125 +++ linux-3.10.0-123.13.2.el7.x86_64/fs/ext4/mballoc.c
126 @@ -5281,7 +5281,6 @@ out:
127                                 void *buddy, void *bitmap, ext4_group_t group)
128  {
129         struct ext4_group_info *grp = ext4_get_group_info(sb, group);
130 -       struct ext4_sb_info *sbi = EXT4_SB(sb);
131         ext4_grpblk_t max = EXT4_CLUSTERS_PER_GROUP(sb);
132         ext4_grpblk_t i = 0;
133         ext4_grpblk_t first;