]> Pileus Git - ~andy/linux/commit
rbd: use binary search for snapshot lookup
authorAlex Elder <elder@inktank.com>
Wed, 1 May 2013 17:43:03 +0000 (12:43 -0500)
committerAlex Elder <elder@inktank.com>
Thu, 2 May 2013 16:58:17 +0000 (11:58 -0500)
commit30d1cff817808fca9801c743d2de4c61f3f38e15
treeb6944042ba2919676bd13ebf84c412b04854f00e
parent15228ede7d9437b0dcfe9331c9830b3646fdadf7
rbd: use binary search for snapshot lookup

Use bsearch(3) to make snapshot lookup by id more efficient.  (There
could be thousands of snapshots, and conceivably many more.)

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c