• Alex Elder's avatar
    rbd: do some header initialization earlier · 2ac4e75d
    Alex Elder authored
    Move some of the code that initializes an rbd header out of
    rbd_init_disk() and into its caller.
    
    Move the code at the end of rbd_init_disk() that sets the device
    capacity and activates the Linux device out of that function and
    into the caller, ensuring we still have the disk size available
    where we need it.
    
    Update rbd_free_disk() so it still aligns well as an inverse of
    rbd_init_disk(), moving the rbd_header_free() call out to its
    caller.
    Signed-off-by: default avatarAlex Elder <elder@inktank.com>
    Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
    2ac4e75d
rbd.c 65.1 KB