An ObjectStore::Sequencer provided to an ObjectStore must not be
deallocated before umount. The ObjectStore::Sequencer may hold a pointer
to the instance with no reference counting. If a Context completes after
the ObjectStore::Sequencer is deleted, it could try to use it and fail.
http://tracker.ceph.com/issues/13176Fixes: #13176
Signed-off-by: Loic Dachary <ldachary@redhat.com>
continue in a do while(false) will always eval false and break
out. To repeat, we need while (true) and an explicit break.
Reported-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Signed-off-by: Sage Weil <sage@redhat.com>
This reverts commit 30810da4b5.
After some discussion we have decided it is better to build a generic
dictionary in pg_pool_t to store infrequently used per-pool properties.
Signed-off-by: Sage Weil <sage@redhat.com>
When comparing two double for strict inequality, a test for equality
using epsilon must also be done to ensure the results do not vary cross
platform.
http://tracker.ceph.com/issues/12936Fixes: #12936
Signed-off-by: Loic Dachary <ldachary@redhat.com>
While we don't allow setting quotas on the global
filesystem root, the inode which is root from the
client mount's point of view might have a quota.
Signed-off-by: John Spray <john.spray@redhat.com>
Generalise the path traversal into check_quota_condition
and then call that from each of file_exceeded, bytes_exceeded,
bytes_approaching with the appropriate lambda function.
Motivated by fixing the path traversal and wanting to
only fix it in one place.
Signed-off-by: John Spray <john.spray@redhat.com>
look at "after giving up session lock it can be freed at any time by response handler" in _op_submit,
so the _op_submit_with_budget::op maybe is wild after call _op_submit.
Fixes: #13208
Signed-off-by: Ruifeng Yang <yangruifeng.09209@h3c.com>
1. We need to return ENOSPC *before* we apply our side-effects to the obc
cache in finish_ctx().
2. Consider object count changes too, not just bytes.
3. Consider cluster full flag, not just the pool flag.
4. Reply only if FULL_TRY; silently drop ops that were sent despite the
full flag.
Fixes: #13098
Signed-off-by: Sage Weil <sage@redhat.com>
This is buggy (we reset the pool epoch each time it remains full instead
of only on the initial transition from non-full to full) and now unused.
Signed-off-by: Sage Weil <sage@redhat.com>
1. The current pool_last_map_marked_full tracking is buggy.
2. We need to recheck this each time we consider the op, not just when it
is received off the wire. Otherwise, we might get a message, queue it
for some reason, get a map indicating the cluster or pool is full, and
then requeue and process the op instead of discarding it.
3. For now, silently drop ops when failsafe check fails. This will lead to
stalled client IO. This needs a more robust fix.
Signed-off-by: Sage Weil <sage@redhat.com>
This currenty only applies to the MDS. Eventually we can remove the
OSD MDS checks once we are confident all MDS instances are new enough
to set this flag.
Signed-off-by: Sage Weil <sage@redhat.com>