We were passing the causative MDS (as an int), but pushing down the
actual Message will help us as we set up an OpTracker.
Signed-off-by: Greg Farnum <greg@inktank.com>
Further parameterize the template to allow passing in an arbitrary parameter,
and move all the Message-based event marking from there into OpRequest.
Signed-off-by: Greg Farnum <greg@inktank.com>
Instead of relying on the message's get_recv_stamp, take a timestamp
when the TrackedOp is constructed. Rename get_received_at() -> get_initiated().
Signed-off-by: Greg Farnum <greg@inktank.com>
I'm not sure why we ever had this instead of just doing things in the
subclass constructor, and the semantics around it don't make much sense
for anything else (we called mark_event first anyway).
Signed-off-by: Greg Farnum <greg@inktank.com>
Previous code assumed null terminated argv[0]
was not longer than PATH_MAX and the resulting
strncpy was not strictly safe.
Modify the bounds to ensure that copy will not
result in an unterminated string if argv[0]
is oversized.
Signed-off-by: John Spray <john.spray@inktank.com>
** CID 1204295: Uninitialized scalar field (UNINIT_CTOR)
/osd/osd_types.h: 2716 in ObjectContext::RWState::RWState()()
Signed-off-by: Sage Weil <sage@inktank.com>
Nothing uses this, but it triggers a new interval, which makes it confusing
when it is not recording in the interval itself. Let's add it now.
Signed-off-by: Sage Weil <sage@inktank.com>
In several places, a change in the up_primary triggers a new peering
interval, but the palces that actually generate the new past intervals,
including check_new_interval(), did not enforce that. This becomes
somewhat obvious when you see that those callers are ignoring the
up_primary output argument for pg_to_up_acting_osds().
Fix this by adding arguments to check_new_interval and fixing the callers
to pass them in properly. Add a unit test case to verify this.
Note that the past interval struct itself does not record who the
up_primary was; possibly it should.
Fixes: #8139
Signed-off-by: Sage Weil <sage@inktank.com>
Feed in the ancestor pg_t (if any) when we are looking at intervals for
previous maps that may have preceded a recent split.
Fixes: #8139
Signed-off-by: Sage Weil <sage@inktank.com>
Listing objects isn't reliable with cache pools; skip that part of the
test if we see that rbd has tiering enabled.
Signed-off-by: Sage Weil <sage@inktank.com>
First, make_writeable treats whiteout heads like snapdir for
cloning purposes. Second, to ensure that we send the correct
deletes on flush to the backing pool, we instead use oi.snaps
on any clone we are flushing to infer the snaps during which
head did not exist and send a delete as appropriate prior to
the copy_from.
Normally, we'd have a problem if the delete and the copy_from
completed, but an interval change intervened before the dirty
flag was cleared since we'd end up re-deleting the object.
To avoid that, we use the CEPH_OSD_FLAG_ORDERSNAP flag.
Additionally, we will use the correct snap_seq on the delete
or flush as appropriate to ensure that the previous clone
gets created with the same clone id as in the cache pool.
Fixes: #7942
Signed-off-by: Samuel Just <sam.just@inktank.com>
We don't actually send the whole info on each repop, just the log
entries, updated stats, and a few other bits. For hit_set ops, we need
to also communicate the new hit_set history status atomically with the
log entries and the transaction. Thus, we add a channel for an optional
pg_hit_set_history_t field in PGBackend::submit_transaction interface
and associated messages and implementations to update the hit_set info
field along with the log entries.
This also means that hit_set_(persist|trim) update an
updated_hit_set_history field on the OpContext instead of directly
modifying the info field.
Fixes: #8124
Signed-off-by: Samuel Just <sam.just@inktank.com>