Skip to content
Commit fcd00b68 authored by Ilya Dryomov's avatar Ilya Dryomov
Browse files

libceph: DEFINE_RB_FUNCS macro



Given

    struct foo {
        u64 id;
        struct rb_node bar_node;
    };

generate insert_bar(), erase_bar() and lookup_bar() functions with

    DEFINE_RB_FUNCS(bar, struct foo, id, bar_node)

The key is assumed to be an integer (u64, int, etc), compared with
< and >.  nodefld has to be initialized with RB_CLEAR_NODE().

Start using it for MDS, MON and OSD requests and OSD sessions.

Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 42a2c09f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment