diff options
author | Matthew Wilcox <willy@infradead.org> | 2018-08-18 07:09:22 -0400 |
---|---|---|
committer | Matthew Wilcox <willy@infradead.org> | 2018-10-21 10:46:45 -0400 |
commit | 372266ba0267803564824b1c09f1bb7f3f3fc761 (patch) | |
tree | e0f2551f5b51b793afe4fe7edfcaf5da6fce974d /tools/testing/radix-tree/main.c | |
parent | adb9d9c4ccb1ff0bf1d376e65f36aa5573c75c1a (diff) | |
download | lwn-372266ba0267803564824b1c09f1bb7f3f3fc761.tar.gz lwn-372266ba0267803564824b1c09f1bb7f3f3fc761.zip |
radix tree test suite: Convert tag_tagged_items to XArray
The tag_tagged_items() function is supposed to test the page-writeback
tagging code. Since that has been converted to the XArray, there's
not much point in testing the radix tree's tagging code. This requires
using the pthread mutex embedded in the xarray instead of an external
lock, so remove the pthread mutexes which protect xarrays/radix trees.
Also remove radix_tree_iter_tag_set() as this was the last user.
Signed-off-by: Matthew Wilcox <willy@infradead.org>
Diffstat (limited to 'tools/testing/radix-tree/main.c')
-rw-r--r-- | tools/testing/radix-tree/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/radix-tree/main.c b/tools/testing/radix-tree/main.c index 79589ea570ab..77a44c54998f 100644 --- a/tools/testing/radix-tree/main.c +++ b/tools/testing/radix-tree/main.c @@ -214,7 +214,7 @@ void copy_tag_check(void) } // printf("\ncopying tags...\n"); - tagged = tag_tagged_items(&tree, NULL, start, end, ITEMS, 0, 1); + tagged = tag_tagged_items(&tree, start, end, ITEMS, XA_MARK_0, XA_MARK_1); // printf("checking copied tags\n"); assert(tagged == count); @@ -223,7 +223,7 @@ void copy_tag_check(void) /* Copy tags in several rounds */ // printf("\ncopying tags...\n"); tmp = rand() % (count / 10 + 2); - tagged = tag_tagged_items(&tree, NULL, start, end, tmp, 0, 2); + tagged = tag_tagged_items(&tree, start, end, tmp, XA_MARK_0, XA_MARK_2); assert(tagged == count); // printf("%lu %lu %lu\n", tagged, tmp, count); |