]> 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)
commit6e0a60426a61447d8718216db9a2b424a5f6e355
tree85bfa5ab49b5a3617b04d8c4c3dab1750550f3dd
parent7979c7b171a4461f48e43919892564b4b5e735a6
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