• A
    rbd: refactor rbd_header_from_disk() · bb23e37a
    Alex Elder 提交于
    This rearranges rbd_header_from_disk so that it:
        - allocates the snapshot context right away
        - keeps results in local variables, not changing the passed-in
          header until it's known we'll succeed
        - does initialization of set-once fields in a header only if
          they have not already been set
    
    The last point is moot at the moment, because rbd_read_header()
    (the only caller) always supplies a zero-filled header buffer.
    Signed-off-by: NAlex Elder <elder@inktank.com>
    Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
    bb23e37a
rbd.c 130.1 KB