]> git.ipfire.org Git - people/arne_f/kernel.git/commit - drivers/block/rbd.c
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)
commit117973fb4c91f3fd913127577e9f71b3aa6cb556
tree30720002351972e6c227f8e9d2d6376021693d09
parent9478554ae5d21d65e948a3eff4ee2a8ad30d70e9
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