diff options
author | Alex Elder <elder@inktank.com> | 2013-04-30 00:44:33 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:20:19 -0700 |
commit | 54cac61fb6b3bacecf5367d3838307b1dd69ace2 (patch) | |
tree | de7d9b8a50637f1d02c289379fbe6d5cb22f635b /drivers/target | |
parent | 9682fc6d3a8b63f58fbfc5084f32c038170cfd6b (diff) |
rbd: use snap_id not index to look up snap info
In order to align with what was needed for format 1 rbd images,
rbd_dev_v2_snap_info() was set up to take as argument an index into
the array of snapshot ids in a rbd device's snapshot context.
This switches that around, so we pass the snapshot id instead.
In doing this, rbd_snap_name() now returns a dynamically-allocated
string rather than a fixed one, so there's no need to make a
duplicate in its caller, rbd_dev_spec_update().
This means the following functions take a snapshot id where they
previously used an index value:
rbd_dev_snap_info()
rbd_dev_v1_snap_info()
rbd_dev_v2_snap_info()
A new function, rbd_dev_snap_index(), determines the snap index for
format 1 images and uses it to look up the name.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/target')
0 files changed, 0 insertions, 0 deletions