Skip to content

Commit ec4faf4

Browse files
committed
style
1 parent a49359e commit ec4faf4

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

module/zfs/btree.c

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ kmem_cache_t *btree_leaf_cache;
4545
* of each node is poisoned appropriately. Note that poisoning always occurs if
4646
* ZFS_DEBUG is set, so it is safe to set the intensity to 5 during normal
4747
* operation.
48-
*
48+
*
4949
* Intensity 4 and 5 are particularly expensive to perform; the previous levels
5050
* are a few memory operations per node, while these levels require multiple
5151
* operations per element. In addition, when creating large btrees, these
52-
* operations are called at every step, resulting in extremely sloww operation
52+
* operations are called at every step, resulting in extremely slow operation
5353
* (while the asymptotic complexity of the other steps is the same, the
5454
* importance of the constant factors cannot be denied).
5555
*/
@@ -60,9 +60,9 @@ int btree_verify_intensity = 0;
6060
#endif
6161

6262
#ifdef _ILP32
63-
#define BTREE_POISON 0xabadb10c
63+
#define BTREE_POISON 0xabadb10c
6464
#else
65-
#define BTREE_POISON 0xabadb10cdeadbeef
65+
#define BTREE_POISON 0xabadb10cdeadbeef
6666
#endif
6767

6868
#ifdef ZFS_DEBUG
@@ -406,7 +406,7 @@ bt_shleft_at_leaf(btree_t *tree, btree_leaf_t *leaf, uint64_t idx,
406406
}
407407

408408
static inline void
409-
bt_transfer_core(btree_t* tree, btree_core_t *source, uint64_t sidx,
409+
bt_transfer_core(btree_t *tree, btree_core_t *source, uint64_t sidx,
410410
uint64_t count, btree_core_t *dest, uint64_t didx, boolean_t trap)
411411
{
412412
size_t size = tree->bt_elem_size;
@@ -423,7 +423,7 @@ bt_transfer_core(btree_t* tree, btree_core_t *source, uint64_t sidx,
423423
}
424424

425425
static inline void
426-
bt_transfer_leaf(btree_t* tree, btree_leaf_t *source, uint64_t sidx,
426+
bt_transfer_leaf(btree_t *tree, btree_leaf_t *source, uint64_t sidx,
427427
uint64_t count, btree_leaf_t *dest, uint64_t didx)
428428
{
429429
size_t size = tree->bt_elem_size;
@@ -572,7 +572,8 @@ btree_insert_into_parent(btree_t *tree, btree_hdr_t *old_node,
572572
* Copy the back part of the elements and children to the new
573573
* leaf.
574574
*/
575-
bt_transfer_core(tree, parent, keep_count, move_count, new_parent, 0, B_TRUE);
575+
bt_transfer_core(tree, parent, keep_count, move_count,
576+
new_parent, 0, B_TRUE);
576577

577578
/* Store the new separator in a buffer. */
578579
uint8_t *tmp_buf = kmem_alloc(size, KM_SLEEP);
@@ -583,7 +584,8 @@ btree_insert_into_parent(btree_t *tree, btree_hdr_t *old_node,
583584
* Shift the remaining elements and children in the front half
584585
* to handle the new value.
585586
*/
586-
bt_shright_at_core(tree, parent, offset, keep_count - 1 - offset, B_FALSE);
587+
bt_shright_at_core(tree, parent, offset, keep_count - 1 -
588+
offset, B_FALSE);
587589

588590
uint8_t *e_start = parent->btc_elems + offset * size;
589591
bcopy(buf, e_start, size);
@@ -930,7 +932,8 @@ btree_bulk_finish(btree_t *tree)
930932
}
931933
}
932934
/* First, shift things in the right node back. */
933-
bt_shift_at_core(tree, cur, 0, hdr->bth_count, move_count, B_TRUE, B_FALSE);
935+
bt_shift_at_core(tree, cur, 0, hdr->bth_count, move_count,
936+
B_TRUE, B_FALSE);
934937

935938
/* Next, move the separator to the right node. */
936939
uint8_t *separator = parent->btc_elems + ((parent_idx - 1) *
@@ -944,7 +947,8 @@ btree_bulk_finish(btree_t *tree)
944947
*/
945948
move_count--;
946949
uint64_t move_idx = l_neighbor->btc_hdr.bth_count - move_count;
947-
bt_transfer_core(tree, l_neighbor, move_idx, move_count, cur, 0, B_TRUE);
950+
bt_transfer_core(tree, l_neighbor, move_idx, move_count, cur, 0,
951+
B_TRUE);
948952

949953
/*
950954
* Finally, move the last element in the left node to the
@@ -1485,8 +1489,8 @@ btree_remove_from_node(btree_t *tree, btree_core_t *node, btree_hdr_t *rm_hdr)
14851489
bcopy(separator, e_out, size);
14861490

14871491
/* Move all our elements and children into the left node. */
1488-
bt_transfer_core(tree, node, 0, idx - 1, left, l_hdr->bth_count +
1489-
1, B_TRUE);
1492+
bt_transfer_core(tree, node, 0, idx - 1, left,
1493+
l_hdr->bth_count + 1, B_TRUE);
14901494
bt_transfer_core(tree, node, idx, hdr->bth_count - idx + 1,
14911495
left, l_hdr->bth_count + idx, B_FALSE);
14921496

0 commit comments

Comments
 (0)