diff options
author | Alex Elder | 2013-04-30 00:44:33 -0500 |
---|---|---|
committer | Sage Weil | 2013-05-01 21:20:20 -0700 |
commit | 2ad3d7167e599fb149ed370a3128140b9deabd5a (patch) | |
tree | 56648210aec482269e5da1986cf1738a71bab164 /drivers/net/macvlan.c | |
parent | 54cac61fb6b3bacecf5367d3838307b1dd69ace2 (diff) |
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 <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/net/macvlan.c')
0 files changed, 0 insertions, 0 deletions