• Ilya Dryomov's avatar
    libceph: DEFINE_RB_FUNCS macro · fcd00b68
    Ilya Dryomov authored
    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>
    fcd00b68
mon_client.c 27.7 KB