diff options
author | 2013-04-30 00:44:33 -0500 | |
---|---|---|
committer | 2013-05-01 21:20:19 -0700 | |
commit | 54cac61fb6b3bacecf5367d3838307b1dd69ace2 (patch) | |
tree | de7d9b8a50637f1d02c289379fbe6d5cb22f635b /tools/perf/scripts/python/export-to-postgresql.py | |
parent | rbd: look up snapshot name in names buffer (diff) | |
download | linux-dev-54cac61fb6b3bacecf5367d3838307b1dd69ace2.tar.xz linux-dev-54cac61fb6b3bacecf5367d3838307b1dd69ace2.zip |
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 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions