diff options
-rw-r--r-- | fs/btrfs/tests/free-space-tree-tests.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/fs/btrfs/tests/free-space-tree-tests.c b/fs/btrfs/tests/free-space-tree-tests.c index c449da4d77b9..061b4d5315c4 100644 --- a/fs/btrfs/tests/free-space-tree-tests.c +++ b/fs/btrfs/tests/free-space-tree-tests.c | |||
@@ -31,7 +31,7 @@ static int __check_free_space_extents(struct btrfs_trans_handle *trans, | |||
31 | struct btrfs_fs_info *fs_info, | 31 | struct btrfs_fs_info *fs_info, |
32 | struct btrfs_block_group_cache *cache, | 32 | struct btrfs_block_group_cache *cache, |
33 | struct btrfs_path *path, | 33 | struct btrfs_path *path, |
34 | struct free_space_extent *extents, | 34 | const struct free_space_extent * const extents, |
35 | unsigned int num_extents) | 35 | unsigned int num_extents) |
36 | { | 36 | { |
37 | struct btrfs_free_space_info *info; | 37 | struct btrfs_free_space_info *info; |
@@ -120,7 +120,7 @@ static int check_free_space_extents(struct btrfs_trans_handle *trans, | |||
120 | struct btrfs_fs_info *fs_info, | 120 | struct btrfs_fs_info *fs_info, |
121 | struct btrfs_block_group_cache *cache, | 121 | struct btrfs_block_group_cache *cache, |
122 | struct btrfs_path *path, | 122 | struct btrfs_path *path, |
123 | struct free_space_extent *extents, | 123 | const struct free_space_extent * const extents, |
124 | unsigned int num_extents) | 124 | unsigned int num_extents) |
125 | { | 125 | { |
126 | struct btrfs_free_space_info *info; | 126 | struct btrfs_free_space_info *info; |
@@ -165,7 +165,7 @@ static int test_empty_block_group(struct btrfs_trans_handle *trans, | |||
165 | struct btrfs_path *path, | 165 | struct btrfs_path *path, |
166 | u32 alignment) | 166 | u32 alignment) |
167 | { | 167 | { |
168 | struct free_space_extent extents[] = { | 168 | const struct free_space_extent extents[] = { |
169 | {cache->key.objectid, cache->key.offset}, | 169 | {cache->key.objectid, cache->key.offset}, |
170 | }; | 170 | }; |
171 | 171 | ||
@@ -179,7 +179,7 @@ static int test_remove_all(struct btrfs_trans_handle *trans, | |||
179 | struct btrfs_path *path, | 179 | struct btrfs_path *path, |
180 | u32 alignment) | 180 | u32 alignment) |
181 | { | 181 | { |
182 | struct free_space_extent extents[] = {}; | 182 | const struct free_space_extent extents[] = {}; |
183 | int ret; | 183 | int ret; |
184 | 184 | ||
185 | ret = __remove_from_free_space_tree(trans, fs_info, cache, path, | 185 | ret = __remove_from_free_space_tree(trans, fs_info, cache, path, |
@@ -200,7 +200,7 @@ static int test_remove_beginning(struct btrfs_trans_handle *trans, | |||
200 | struct btrfs_path *path, | 200 | struct btrfs_path *path, |
201 | u32 alignment) | 201 | u32 alignment) |
202 | { | 202 | { |
203 | struct free_space_extent extents[] = { | 203 | const struct free_space_extent extents[] = { |
204 | {cache->key.objectid + alignment, | 204 | {cache->key.objectid + alignment, |
205 | cache->key.offset - alignment}, | 205 | cache->key.offset - alignment}, |
206 | }; | 206 | }; |
@@ -224,7 +224,7 @@ static int test_remove_end(struct btrfs_trans_handle *trans, | |||
224 | struct btrfs_path *path, | 224 | struct btrfs_path *path, |
225 | u32 alignment) | 225 | u32 alignment) |
226 | { | 226 | { |
227 | struct free_space_extent extents[] = { | 227 | const struct free_space_extent extents[] = { |
228 | {cache->key.objectid, cache->key.offset - alignment}, | 228 | {cache->key.objectid, cache->key.offset - alignment}, |
229 | }; | 229 | }; |
230 | int ret; | 230 | int ret; |
@@ -248,7 +248,7 @@ static int test_remove_middle(struct btrfs_trans_handle *trans, | |||
248 | struct btrfs_path *path, | 248 | struct btrfs_path *path, |
249 | u32 alignment) | 249 | u32 alignment) |
250 | { | 250 | { |
251 | struct free_space_extent extents[] = { | 251 | const struct free_space_extent extents[] = { |
252 | {cache->key.objectid, alignment}, | 252 | {cache->key.objectid, alignment}, |
253 | {cache->key.objectid + 2 * alignment, | 253 | {cache->key.objectid + 2 * alignment, |
254 | cache->key.offset - 2 * alignment}, | 254 | cache->key.offset - 2 * alignment}, |
@@ -273,7 +273,7 @@ static int test_merge_left(struct btrfs_trans_handle *trans, | |||
273 | struct btrfs_path *path, | 273 | struct btrfs_path *path, |
274 | u32 alignment) | 274 | u32 alignment) |
275 | { | 275 | { |
276 | struct free_space_extent extents[] = { | 276 | const struct free_space_extent extents[] = { |
277 | {cache->key.objectid, 2 * alignment}, | 277 | {cache->key.objectid, 2 * alignment}, |
278 | }; | 278 | }; |
279 | int ret; | 279 | int ret; |
@@ -311,7 +311,7 @@ static int test_merge_right(struct btrfs_trans_handle *trans, | |||
311 | struct btrfs_path *path, | 311 | struct btrfs_path *path, |
312 | u32 alignment) | 312 | u32 alignment) |
313 | { | 313 | { |
314 | struct free_space_extent extents[] = { | 314 | const struct free_space_extent extents[] = { |
315 | {cache->key.objectid + alignment, 2 * alignment}, | 315 | {cache->key.objectid + alignment, 2 * alignment}, |
316 | }; | 316 | }; |
317 | int ret; | 317 | int ret; |
@@ -350,7 +350,7 @@ static int test_merge_both(struct btrfs_trans_handle *trans, | |||
350 | struct btrfs_path *path, | 350 | struct btrfs_path *path, |
351 | u32 alignment) | 351 | u32 alignment) |
352 | { | 352 | { |
353 | struct free_space_extent extents[] = { | 353 | const struct free_space_extent extents[] = { |
354 | {cache->key.objectid, 3 * alignment}, | 354 | {cache->key.objectid, 3 * alignment}, |
355 | }; | 355 | }; |
356 | int ret; | 356 | int ret; |
@@ -396,7 +396,7 @@ static int test_merge_none(struct btrfs_trans_handle *trans, | |||
396 | struct btrfs_path *path, | 396 | struct btrfs_path *path, |
397 | u32 alignment) | 397 | u32 alignment) |
398 | { | 398 | { |
399 | struct free_space_extent extents[] = { | 399 | const struct free_space_extent extents[] = { |
400 | {cache->key.objectid, alignment}, | 400 | {cache->key.objectid, alignment}, |
401 | {cache->key.objectid + 2 * alignment, alignment}, | 401 | {cache->key.objectid + 2 * alignment, alignment}, |
402 | {cache->key.objectid + 4 * alignment, alignment}, | 402 | {cache->key.objectid + 4 * alignment, alignment}, |