This should work for now, long term we probably want to get
rid of FuturizedCollection entirely from the interface.
Signed-off-by: Samuel Just <sjust@redhat.com>
There are two main consequences of this:
1. Messages can't be default copy constructed in crimson. MMonCommand
seems to be the only user, and we simply add a copy constructor that
duplicates data portions of the message.
2. We can't casually copy-construct the conn into other structures.
The main user here is watch/notify. We use copy() explicitely
to populate the object_context structures and avoid passing
ConnectionFRef by value.
Signed-off-by: Samuel Just <sjust@redhat.com>
The state shared between sub events creates problems for multicore. The
only user is MOSDPGCreate2, so the optimization isn't really worth
salvaging.
Signed-off-by: Samuel Just <sjust@redhat.com>
Otherwise, tasks waiting on the stage will wake up on the wrong core.
Later, we may choose to statically enable this behavior only for stages
that can actually span cores, but this is ok for now.
Signed-off-by: Samuel Just <sjust@redhat.com>
We may later need to syncronize this across cores, perhaps during tick.
This should work for now, however.
Signed-off-by: Samuel Just <sjust@redhat.com>
We don't really want a global counter here if we can avoid it. Instead,
assign tids with core-local counters prefixed with the core id. We
continue to ensure that tids are unique within an osd boot, but lose
the property that sucessive tids on different cores are ordered. I
don't see anything relying on that property, however, so this should be
fine.
Signed-off-by: Samuel Just <sjust@redhat.com>
The main user of num_pgs was get_target_pg_log_entries(), but we
don't really want to be accessing a global counter there if we
can avoid it. Instead, compute a core-local target and use the
core-local pg count.
Signed-off-by: Samuel Just <sjust@redhat.com>
Context handling is pretty uniform accross all implementations,
may as well do it in the same place.
ShardedStoreProxy would need to handle it otherwise, since
callbacks need to be handled on the core do_transaction is
invoked on.
Signed-off-by: Samuel Just <sjust@redhat.com>
For now, FuturizedStore implementations assume that methods are invoked
on core 0. Later, we'll adapt each implementation to intelligently
support invocation on any pg core. Until then, this wrapper converts
the existing implementations to a safe, if not particuarly performant,
proxy behavior.
AlienStore should be safe as is.
Signed-off-by: Samuel Just <sjust@redhat.com>
OSDSingletonState will now only be responsible for the spg_t->core
mapping for pgs, the individual PerShardState's will hold local
PGMap's. PG management operations are now proxied from PGShardManager
to PerShardState. Subsequent patches will shard PerShardState.
Signed-off-by: Samuel Just <sjust@redhat.com>
The op will actually be run generally on a different core, so we don't
want to be returning a reference to it.
Signed-off-by: Samuel Just <sjust@redhat.com>
Since the default of None gets interpreted as 'lvm', the only useful
value would be 'raw'. This will enable us to use loop devices inside
containers for OSDs.
Signed-off-by: Zack Cerza <zack@redhat.com>
The test_orphan_scan test deliberately removes a dentry which will cause
rstat damage. Ignore it.
Fixes: https://tracker.ceph.com/issues/57657
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
In newer versions the policies is inside the code
so we don't need these files for default policy
anymore.
Signed-off-by: Tobias Urdin <tobias.urdin@binero.se>
This commit corrects the formatting of a note that previously
did not make console output and commands as clear as this commit
makes them.
Signed-off-by: Zac Dover <zac.dover@gmail.com>
mds/Server: Do not abort MDS on unknown messages
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
temporary_buffer is internally shareable with a thread-unsafe
ref-counter, we need to make sure it is released in the same core where
it is constructed.
Users that need the extra efficiency can swap to create_local as needed.
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>