]> git.baikalelectronics.ru Git - kernel.git/commit
rbd: set up watch in rbd_dev_image_probe()
authorAlex Elder <elder@inktank.com>
Sat, 27 Apr 2013 14:59:31 +0000 (09:59 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:20:01 +0000 (21:20 -0700)
commit19e204d146a0d29e4c782bfbe8b9a5fbe93e68eb
tree85bfa5ab49b5a3617b04d8c4c3dab1750550f3dd
parentdfb75ad06b04e2d93904b24aae35897fa31a848e
rbd: set up watch in rbd_dev_image_probe()

Move setting up the watch request for an image so it's done in
rbd_dev_image_probe() rather than rbd_dev_probe_finish().  Move
it all the way up to before doing the initial probe.  This avoids
a potential race condition, in which we get (and use) the initial
snapshot context for an image, and it gets changed between that
time and the time we get the watch set up.

This resolves:
    http://tracker.ceph.com/issues/3871

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c