]> Pileus Git - ~andy/linux/commit
rbd: don't look up snapshot id in rbd_dev_mapping_set()
authorAlex Elder <elder@inktank.com>
Mon, 6 May 2013 12:40:30 +0000 (07:40 -0500)
committerAlex Elder <elder@inktank.com>
Wed, 8 May 2013 12:48:11 +0000 (07:48 -0500)
commit8f4b7d9821715767ac28bbc2d401bbb5f3f9a448
tree9486cd94a485ae65f9d30e2ea530033f618c48b8
parentc734b79655a91a24afcae73738a43a0db09a801a
rbd: don't look up snapshot id in rbd_dev_mapping_set()

Currently rbd_dev_mapping_set() looks up the snapshot id for the
snapshot whose name is found in the rbd device's spec structure.

That function gets called by rbd_dev_device_setup(), which is
called by rbd_add() *after* rbd_dev_image_probe().  If the
image probe succeeds, the rbd device's spec will already have
been updated to include names and ids for all fields.

Therefore there's no need to look up the snapshot id in
rbd_dev_mapping_set().

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