Aside from expose an ECBackend internal detail, it causes ReplicatedPG
to cache the value causing trouble with WRITEFULL.
Partially fixes: #12983
Signed-off-by: Samuel Just <sjust@redhat.com>
The previous code erroneously assumed that the reads on a single object
would always be in order, and not overlap.
Partially fixes: #12983
Signed-off-by: Samuel Just <sjust@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>
Otherwise, if we get an incremental from hammer (struct_v = 6) we will
encode the full map as if it were before CEPH_FEATURE_PGID64, which
was actually pre-argonaut. Similarly, if struct_v >= 7, we know it
was encoded with CEPH_FEATURE_OSDMAP_ENC.
Fixes: #13234
Backport: hammer
Signed-off-by: Samuel Just <sjust@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>
FULL_TRY = try to do the op; ENOSPC if it results in a net increase is
space. client must cope.
FULL_FORCE = do the op even if it consumes space. The MDS will use this.
We should restrict this based on the OSD cap (* vs w, probably).
Signed-off-by: Sage Weil <sage@redhat.com>
Hammer is sloppy about the hobject_t's it uses for the scrub bounds in that
the pool isn't set. (Hammer FileStore doesn't care, but post-hammer is
much more careful about this sort of thing.)
Compensate by setting the pool on any scrub messages we receive.
Signed-off-by: Sage Weil <sage@redhat.com>
These are relatively expensive (we grab the full map from the mon) so we
should avoid duplicating our requests.
Track which requests are in flight. Only send a new request when new
maps are asked for. Resend requests when there is a new mon session.
Signed-off-by: Sage Weil <sage@redhat.com>