From: Alex Elder Date: Tue, 30 Apr 2013 05:44:33 +0000 (-0500) Subject: rbd: define rbd_snap_size() and rbd_snap_features() X-Git-Tag: omap-for-v3.10/dt-fixes-for-merge-window~26^2~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ad3d7167e599fb149ed370a3128140b9deabd5a;p=pandora-kernel.git rbd: define rbd_snap_size() and rbd_snap_features() This patch defines a handful of new functions that will allow us to get rid of the rbd device structure's list of snapshots. Define rbd_snap_id_by_name() to look up a snapshot id given its name. This is efficient for format 1 images but not for format 2. Fortunately it only gets called at mapping time so it's not that critical. Use rbd_snap_id_by_name() to find out the id for a snapshot getting mapped, and pass that id to new functions rbd_snap_size() and rbd_snap_features() to look up information about a given snapshot's size and feature mask given its snapshot id. All this gets done in rbd_dev_mapping_set(). As a result, snap_by_name() is no longer needed, so get rid of it. Signed-off-by: Alex Elder Reviewed-by: Josh Durgin --- Reading git-diff-tree failed