aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/quick-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/quick-test.c')
-rw-r--r--fs/btrfs/quick-test.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/btrfs/quick-test.c b/fs/btrfs/quick-test.c
index ccca9b2c14a3..07fd71b77627 100644
--- a/fs/btrfs/quick-test.c
+++ b/fs/btrfs/quick-test.c
@@ -71,9 +71,10 @@ int main(int ac, char **av) {
71 close_ctree(root, &super); 71 close_ctree(root, &super);
72 root = open_ctree("dbfile", &super); 72 root = open_ctree("dbfile", &super);
73 printf("node %p level %d total ptrs %d free spc %lu\n", root->node, 73 printf("node %p level %d total ptrs %d free spc %lu\n", root->node,
74 node_level(root->node->node.header.flags), 74 btrfs_header_level(&root->node->node.header),
75 root->node->node.header.nritems, 75 btrfs_header_nritems(&root->node->node.header),
76 NODEPTRS_PER_BLOCK - root->node->node.header.nritems); 76 NODEPTRS_PER_BLOCK -
77 btrfs_header_nritems(&root->node->node.header));
77 printf("all searches good, deleting some items\n"); 78 printf("all searches good, deleting some items\n");
78 i = 0; 79 i = 0;
79 srand(55); 80 srand(55);
@@ -126,7 +127,8 @@ int main(int ac, char **av) {
126 release_path(root, &path); 127 release_path(root, &path);
127 } 128 }
128 printf("starting big long delete run\n"); 129 printf("starting big long delete run\n");
129 while(root->node && root->node->node.header.nritems > 0) { 130 while(root->node &&
131 btrfs_header_nritems(&root->node->node.header) > 0) {
130 struct leaf *leaf; 132 struct leaf *leaf;
131 int slot; 133 int slot;
132 ins.objectid = (u64)-1; 134 ins.objectid = (u64)-1;
@@ -137,7 +139,7 @@ int main(int ac, char **av) {
137 139
138 leaf = &path.nodes[0]->leaf; 140 leaf = &path.nodes[0]->leaf;
139 slot = path.slots[0]; 141 slot = path.slots[0];
140 if (slot != leaf->header.nritems) 142 if (slot != btrfs_header_nritems(&leaf->header))
141 BUG(); 143 BUG();
142 while(path.slots[0] > 0) { 144 while(path.slots[0] > 0) {
143 path.slots[0] -= 1; 145 path.slots[0] -= 1;