• Alex Elder's avatar
    rbd: a few simple changes · f0f8cef5
    Alex Elder authored
    Here are a few very simple cleanups:
        - Add a "RBD_" prefix to the two driver name string definitions.
        - Move the definition of struct rbd_request below struct rbd_req_coll
          to avoid the need for an empty declaration of the latter.
        - Move and group the definitions of rbd_root_dev_release() and
          rbd_root_dev, as well as rbd_bus_type and rbd_bus_attrs[],
          close to the top of the file.  Arrange the latter so
          rbd_bus_type.bus_attrs can be initialized statically.
        - Get rid of an unnecessary local variable in rbd_open().
        - Rework some hokey logic in rbd_bus_add_dev(), so the value of
          "ret" at the end is either 0 or -ENOENT to avoid the need for
          the code duplication that was there.
        - Rename a goto target in rbd_add().
    Signed-off-by: default avatarAlex Elder <elder@dreamhost.com>
    Signed-off-by: default avatarSage Weil <sage@newdream.net>
    f0f8cef5
rbd.c 55 KB