dm ioctl: replace device hash with red-black tree
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 10 Mar 2021 10:18:03 +0000 (05:18 -0500)
committerMike Snitzer <snitzer@redhat.com>
Fri, 26 Mar 2021 18:53:41 +0000 (14:53 -0400)
commitb82096afc8afdc55408efb54ede2ec55c1f3f8c8
tree2e329cff5c720e94659027ad05b4f8336b3a6866
parent219a9b5e738b75a6a5e9effe1d72f60037a2f131
dm ioctl: replace device hash with red-black tree

For high numbers of DM devices the 64-entry hash table has non-trivial
overhead. Fix this by replacing the hash table with a red-black tree.

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-ioctl.c