]> Pileus Git - ~andy/linux/commit
rbd: only set up watch for mapped images
authorAlex Elder <elder@inktank.com>
Mon, 6 May 2013 22:40:33 +0000 (17:40 -0500)
committerAlex Elder <elder@inktank.com>
Thu, 9 May 2013 01:16:55 +0000 (20:16 -0500)
commit1f3ef78861ac4b510175e177899b9b5ba4bbed91
treeedf2c0b20d647f495bf7d596f72b08349115d772
parent7ce4eef7b5fad73b365b7e4b8892af3af72d4bd3
rbd: only set up watch for mapped images

Any changes to parent images are immaterial to any mapped clone.
So there is no need to have a watch event registered on header
objects except for the header object of an image that is mapped.
In fact, a watch request is a write operation, and we may only
have read access to a parent image.

We can't set up the watch request until we know the name of the
header object though.  So pass a flag to rbd_dev_image_probe() to
indicate whether this probe is for a mapping or for a parent image.

Change the second parameter to rbd_dev_header_watch_sync() be
Boolean while we're at it.

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

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