When the exclusive lock is unlocked, the error code should be
-EBLACKLISTED when the client is blacklisted, otherwise -EROFS.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
a84fbb2565fb603ea809487d920461d14442d188)
ldout(m_image_ctx.cct, 20) << dendl;
}
+template <typename I>
+int ExclusiveLock<I>::get_unlocked_op_error() const {
+ if (m_image_ctx.image_watcher->is_blacklisted()) {
+ return -EBLACKLISTED;
+ }
+ return -EROFS;
+}
+
template <typename I>
void ExclusiveLock<I>::init(uint64_t features, Context *on_init) {
assert(m_image_ctx.owner_lock.is_locked());
void block_requests(int r);
void unblock_requests();
+ int get_unlocked_op_error() const;
+
void init(uint64_t features, Context *on_init);
void shut_down(Context *on_shutdown);
MOCK_METHOD0(accept_requests, bool());
MOCK_METHOD0(accept_ops, bool());
+ MOCK_METHOD0(get_unlocked_op_error, int());
MOCK_METHOD0(start_op, Context*());
};