]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: define rbd_dev_v2_refresh()
authorAlex Elder <elder@inktank.com>
Fri, 31 Aug 2012 22:29:55 +0000 (17:29 -0500)
committerAlex Elder <elder@inktank.com>
Wed, 10 Oct 2012 14:43:39 +0000 (07:43 -0700)
commit7627524a0066ba03b60b01d88a8eb71f5b790442
tree30720002351972e6c227f8e9d2d6376021693d09
parentd265c8819da9963bf9e71ccf7c3e3435c99ccb03
rbd: define rbd_dev_v2_refresh()

Define a new function rbd_dev_v2_refresh() to update/refresh the
snapshot context for a format version 2 rbd image.  This function
will update anything that is not fixed for the life of an rbd
image--at the moment this is mainly the snapshot context and (for
a base mapping) the size.

Update rbd_refresh_header() so it selects which function to use
based on the image format.

Rename __rbd_refresh_header() to be rbd_dev_v1_refresh()
to be consistent with the naming of its version 2 counterpart.
Similarly rename rbd_refresh_header() to be rbd_dev_refresh().

Unrelated--we use rbd_image_format_valid() here.  Delete the other
use of it, which was primarily put in place to ensure that function
was referenced at the time it was defined.

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