From: Alex Elder Date: Mon, 6 May 2013 14:51:30 +0000 (-0500) Subject: rbd: define rbd_dev_v2_header_info() X-Git-Tag: v3.10-rc2~28^2~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2df3fac75851dc4257b90dc72fdd3cf27ba177bc;p=pandora-kernel.git 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 Reviewed-by: Josh Durgin --- Reading git-diff-tree failed