osd: Correction to #6690 change

Reorder sequence so min_size check is right
Remove redundant resize of backfill

Correction to 19cff890eb6083eefdb7b709773313b2c8acbcea

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: do not send peering messages during init

Do not send any peering messages while we are still working our way
through init().

Fixes: #7093
Signed-off-by: Sage Weil <sage@inktank.com>
osd: ignore OSDMap messages while we are initializing

The mon may occasionally send OSDMap messages to random OSDs, but is not
very descriminating in that we may not have authenticated yet.  Ignore any
messages if that is the case; we will reqeust whatever we need during the
BOOTING state.

Fixes: #7093
Signed-off-by: Sage Weil <sage@inktank.com>
mon: only send messages to current OSDs

When choosing a random OSD to send a message to, verify not only that
the OSD id is up but that the session is for the same instance of that OSD
by checking that the address matches.

Fixes: #7093
Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
osd: Remove redundant incompat feature

We can remove this CompatSet bit without worry because the only
way it could have been set is if an erasure coded pool was create.
This isn't supported as of yet.

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Config OSD when CEPH_FEATURE_OSD_ERASURE_CODES feature first seen

Set the OSD superblock CEPH_OSD_FEATURE_INCOMPAT_SHARDS and
notify the filestore through set_allow_sharded_objects() in that order.

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Determine if compatibility is required due to back level OSDs

fixes: #7039

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Fix problems in ReplicatedPG::do_op() logic

Fix assert(is_degraded_object(soid)) in ReplicatedPG::wait_for_degraded_object()
  Use last_backfill_started as the backfill line
  Handle uncommon case of multi op source after backfill line and target before
  backfill line and !is_degraded_object().
  Include backfill line itself for before_backfill (<= instead of <)

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Return false for func that returns bool

Signed-off-by: David Zafman <david.zafman@inktank.com>
messages, os, osd: Clean-up g/hobject_t MAX handling

Add check of is_max() before updating an unset pool
Use efficient is_max() instead of compare with hobject::get_max()

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Recovery reservations need to include backfill peers

Caused by 86e4fd4f7a9848511e1bf9ae433fcd3a35a0818f

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Interim working version with backfill reserve state changes

Signed-off-by: David Zafman <david.zafman@inktank.com>
osd: Change waiting_on_backfill to a set<int>

Signed-off-by: David Zafman <david.zafman@inktank.com>
Merge pull request #1045 from ceph/wip-7093

fix for #7093

Reviewed-by: Samuel Just <sam.just@inktank.com>
mon: implement 'mds set max_mds|max_file_size'

First, add the ability to modify max_file_size.  While we are at it, move
to a more sensible interface for adjusting max_mds too.

Signed-off-by: Sage Weil <sage@inktank.com>
mds/MDSMap: include max_file_size in plaintext print output

Signed-off-by: Sage Weil <sage@inktank.com>
rgw: convert bucket info if needed

Fixes: #7110
In dumpling, the bucket info was separated into bucket entry point and
bucket instance objects. When setting bucket attrs we only ended up
updating the bucket instance object. However, pre-dumpling buckets still
keep everything at the entry-point object, so acl changes didn't affect
anything (because we never updated the entry point). This change just
converts the bucket info into the new format.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
mon: set next commit in mon command replies

The mon command acks include a version that is used by the client to
determine which version of the map they need to get or wait for in order
to see the effects of their command.  Current we are returning
get_last_committed() everywhere, but we are about to commit something (and
waiting for it), which will increase that value by one.  As a result,
clients are always getting epoch/version-1 instead of epoch.

This manifested by a LibRadosTier.Promote test that failed becaues the
OSD had the OSDMap updates adding the tier and overlay but not the final
map change that set the cache-mode to writeback.  I suspect this is also
the cause of of spurious errors in the past where we've seen misdirected
request errors that made no sense.

Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao@inktank.com>
FileStore: detect XFS properly

We were only setting m_fs_type = FS_TYPE_XFS if
m_filestore_replica_fadvise was also set -- presumably
the bug fix accidentally blocked off too much of the code type. This
resulted in our xattr counts always being set too low: the store
is mounted (and thus does _detectfs) twice; once in as part of the
not-as-conditional-as-it-looks convertfs in ceph_osd.cc, and once
as part of OSD::init().

Reported-by: Sushma Gurram <Sushma.Gurram@sandisk.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
mongoose: fix warning

Signed-off-by: Sage Weil <sage@inktank.com>