Linger operations will follow the object to the cache pool when the pool
overlay process is set. If we evict the object, the object_info_t will
go away along with the watch state and confusing things will happen.
Prevent that from happening by returning EBUSY when you try to evict a
watched object.
Note that you *can* flush a watched object, and the dirty flag will be
cleared. But you still can't evict it.
Signed-off-by: Sage Weil <sage@inktank.com>
result = -EBUSY;
break;
}
+ if (!oi.watchers.empty()) {
+ result = -EBUSY;
+ break;
+ }
result = _delete_head(ctx, true);
}
break;