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