diff options
author | Alex Elder <elder@inktank.com> | 2013-04-28 23:32:34 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-01 21:20:04 -0700 |
commit | 6fd48b3be9f6d195a970b92040d097b5b886a99b (patch) | |
tree | b298c92859155d17366b03a546c5b1bdfc4299c3 /fs/internal.h | |
parent | 200a6a8be5dba96df121f3d2363964dd77ee7e1b (diff) |
rbd: define rbd_dev_unprobe()
Define a new function rbd_dev_unprobe() which undoes state changes
that occur from calling rbd_dev_v1_probe() or rbd_dev_v2_probe().
Note that this is a superset of rbd_header_free(), which is now
getting removed (it seems to have been used improperly anyway).
Flesh out rbd_dev_image_release() so it undoes exactly what
rbd_dev_image_probe() does.
This means that:
- rbd_dev_device_release() gets called when the last device
reference gets dropped;
- that undoes everything done by the rbd_dev_device_setup() call
at the end of rbd_dev_image_probe() (and nothing more), ending
by calling rbd_dev_image_release(); and
- rbd_dev_image_release() undoes everything else done by
rbd_dev_image_probe() (and this includes a call to
rbd_dev_unprobe().
This means the image and device portions of an rbd device are fairly
cleanly separated now, so error paths should be a little easier to
verify than they used to be.
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'fs/internal.h')
0 files changed, 0 insertions, 0 deletions