]> Pileus Git - ~andy/linux/commit
rbd: simplify rbd_dev_v1_probe()
authorAlex Elder <elder@inktank.com>
Mon, 6 May 2013 14:51:30 +0000 (09:51 -0500)
committerAlex Elder <elder@inktank.com>
Wed, 8 May 2013 22:00:41 +0000 (17:00 -0500)
commit30d60ba2f258da24b91edb880338c7178f901de9
treeb0b39018e786a342da043517005e0201711053f3
parent662518b128c27def65e9af4bea2b56a1e04b3251
rbd: simplify rbd_dev_v1_probe()

An rbd_dev structure's fields are all zero-filled for an initial
probe, so there's no need to explicitly zero the parent_spec
and parent_overlap fields in rbd_dev_v1_probe().  Removing these
assignments makes rbd_dev_v1_probe() *almost* trivial.

Move the dout() message that announces discovery of an image into
rbd_dev_image_probe(), generalize to support images in either format
and only show it if an image is fully discovered.

This highlights that are some unnecessary cleanups in the error
path for rbd_dev_v1_probe(), so they can be removed.

Now rbd_dev_v1_probe() *is* a trivial wrapper function.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c