We were storing table_size_ and raw_table_size_, where one is the size in
bits and the other is the size in bytes. This is silly. Store only the
size in bytes.
Also, bytes are always 8 bits, so use bit shifts and drop some of that
silliness too.
Move the member declarations to the top of the class so you read them
before the methods.
Fix some annoying whitespace.
Avoid allocating a 0-length array.
Mark the encoding incompatible with v1.
Signed-off-by: Sage Weil <sage@inktank.com>
In FileStore::_detect_fs() store discovered filesystem type in m_fs_type
Add per-filesystem filestore_max_inline_xattr_size_* variants
Add per-filesystem filestore_max_inline_xattrs_* variants
New function set_xattr_limits_via_conf()
Set m_filestore_max_inline_xattr_size based on override or fs type
Set m_filestore_max_inline_xattrs based on override or fs type
Handle conf change of any relevant value by calling set_xattr_limits_via_conf()
Change filestore_max_inline_xattr_size to override if non-zero
Change filestore_max_inline_xattrs to override if non-zero
Fixes: #6143
Signed-off-by: David Zafman <david.zafman@inktank.com>
This will be important since the erasure coded pg will have a different
on-disk format than the replicated backend.
Signed-off-by: Samuel Just <sam.just@inktank.com>
We don't want to trim past the current osd map for any up osd.
osd_epochs provides a lower bound for that epoch for each osd.
Fixes: 5869
Signed-off-by: Samuel Just <sam.just@inktank.com>
Also, osd_stat will be empty for out osd.
When an osd is marked out, rather than remove it from osd_stat,
we instead 0 out the structure.
This patch also makes osd_stat_updates and osd_stat_rm private.
This should make it simpler to enforce invariants on these
mappings.
Each up osd will have a mapping since out osds are now included as
empty stats.
Signed-off-by: Samuel Just <sam.just@inktank.com>
Note that the OSD behaves in a weird way when you rollback to a non-
existent snap, so the test probably isn't the only party at fault here.
Fixes (test half of): #6254
Backport: dumpling, cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Bring this whole if/else chain up one level so that we can capture both
ENOENT and whiteout in the same case. (And don't dereference the
pointer when we know it is NULL.)
Fixes: #6474
Signed-off-by: Sage Weil <sage@inktank.com>
If we are not a monitor and we don't have a session yet, we must first
authenticate with the cluster. Therefore, the first message to the
monitor must be an MAuth. If not, we assume it's a stray message and
just drop it.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
We expect to always have a connection associated with a message.
If that happens to not be so, assert.
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
MonMap changes lead to bootstraps. Callbacks waiting for a proposal to
finish can have several fates, depending on what happens: finished, rerun
or aborted.
In the case of a bootstrap right after a monmap change, callbacks are
rerun. Considering we queued the message that lead to the monmap change
on this queue, if we instead of finishing it end up reruning it, we will
end up trying to perform the same modification twice -- the last one will
try to modify an already existing state and we will return just that:
whatever you're attempting to do has already been done.
This patch makes 'ceph mon add' completely idempotent. If one tries to
add an already existing monitor (i.e., same name, same ip:port), one
simply gets a 'monitor foo added', with return 0, no matter how many
times one runs the command.
Fixes: #5896
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>