]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
rbd: define rbd_dev_v2_header_info()
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:52 +0000 (17:00 -0500)
commit2df3fac75851dc4257b90dc72fdd3cf27ba177bc
tree7fe0400a4bec6c3a7e89d76aa11e27d30320fc78
parent99a41ebcee1a1ea0463b1b29d2e888de21a60c66
rbd: define rbd_dev_v2_header_info()

This rearranges rbd_dev_v2_refresh() so it works more like
rbd_dev_v1_header_info().  While format 1 images need to read the
whole header object to get any information, format 2 can collect
almost all information selectively.  So the one-time initialization
will remain in a separate function--based on rbd_dev_v2_probe().

Rename rbd_dev_v2_refresh() to be rbd_dev_v2_header_info(), and have
it call rbd_dev_v2_header_onetime() if it's being called for the
first time for the given rbd device.

Rename rbd_dev_v2_probe() to be rbd_dev_v2_header_onetime() and
remove the image size and snapshot context calls it held in
common with the refresh function.

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