Commit 0bf2d83
taskstats: fix struct taskstats breaks backward compatibility since version 15
Problem
========
commit 658eb5a ("delayacct: add delay max to record delay peak")
- adding more fields
commit f65c64f ("delayacct: add delay min to record delay peak")
- adding more fields
commit b016d08 ("taskstats: modify taskstats version")
- version bump to 15
Since version 15 (TASKSTATS_VERSION=15) the new layout of the structure
adds fields in the middle of the structure, rendering all old software
incompatible with newer kernels and software compiled against the new
kernel headers incompatible with older kernels.
Solution
=========
move delay max and delay min to the end of taskstat, and bump
the version to 16 after the change
[wang.yaxin@zte.com.cn: adjust indentation]
Link: https://lkml.kernel.org/r/202505192131489882NSciXV4EGd8zzjLuwoOK@zte.com.cn
Link: https://lkml.kernel.org/r/20250510155413259V4JNRXxukdDgzsaL0Fo6a@zte.com.cn
Fixes: f65c64f ("delayacct: add delay min to record delay peak")
Signed-off-by: Wang Yaxin <wang.yaxin@zte.com.cn>
Signed-off-by: xu xin <xu.xin16@zte.com.cn>
Signed-off-by: Kun Jiang <jiang.kun2@zte.com.cn>
Reviewed-by: Yang Yang <yang.yang29@zte.com.cn>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 66f28ff commit 0bf2d83
1 file changed
Lines changed: 29 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | 75 | | |
78 | 76 | | |
79 | 77 | | |
| |||
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | | - | |
86 | | - | |
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
90 | 86 | | |
91 | | - | |
92 | | - | |
93 | 87 | | |
94 | 88 | | |
95 | 89 | | |
| |||
172 | 166 | | |
173 | 167 | | |
174 | 168 | | |
175 | | - | |
176 | | - | |
| 169 | + | |
177 | 170 | | |
178 | 171 | | |
179 | 172 | | |
180 | 173 | | |
181 | | - | |
182 | | - | |
183 | 174 | | |
184 | 175 | | |
185 | 176 | | |
186 | 177 | | |
187 | 178 | | |
188 | 179 | | |
189 | 180 | | |
190 | | - | |
191 | | - | |
192 | 181 | | |
193 | 182 | | |
194 | 183 | | |
| |||
210 | 199 | | |
211 | 200 | | |
212 | 201 | | |
213 | | - | |
214 | | - | |
215 | 202 | | |
216 | 203 | | |
217 | 204 | | |
218 | 205 | | |
219 | | - | |
220 | | - | |
221 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
222 | 233 | | |
223 | 234 | | |
224 | 235 | | |
| |||
0 commit comments