rbd: retry watch re-registration periodically
authorIlya Dryomov <idryomov@gmail.com>
Fri, 12 Aug 2016 14:11:41 +0000 (16:11 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Wed, 24 Aug 2016 21:49:16 +0000 (23:49 +0200)
commit99d1694310df3ffef66902f5bc1a23e95a724aa3
treeb6b5aa340ac11b63d07c5022c69a1d1be4a0edea
parent1643dfa4c2c827d6e2aa419df8c17b0f24090278
rbd: retry watch re-registration periodically

Revamp watch code to support retrying watch re-registration:

- add rbd_dev->watch_state for more robust errcb handling
- store watch cookie separately to avoid dereferencing watch_handle
  which is set to NULL on unwatch
- move re-register code into a delayed work and retry re-registration
  every second, unless the client is blacklisted

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Tested-by: Mike Christie <mchristi@redhat.com>
drivers/block/rbd.c
net/ceph/osd_client.c