mds: Locker: fix a NULL deref in _update_cap_fields

The MClientCaps* is allowed to be NULL, so we can't deref it unless
the dirty param is non-zero. So don't do the ahead-of-time lookup;
just call it explicitly in the if block.

Signed-off-by: Greg Farnum <greg@inktank.com>
PG::choose_acting: in mixed cluster case, acting may include backfill

Fixes: 9696
Backport: firefly, giant
Introduced: 92cfd370395385ca5537b5bc72220934c9f09026
Signed-off-by: Samuel Just <sam.just@inktank.com>
Merge pull request #2679 from ceph/giant-locker-null

mds: Locker: fix a NULL deref in _update_cap_fields
mds: Locker: remove unused variable

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Merge pull request #2693 from ceph/giant-unused-variable

Giant unused variable
Merge pull request #2684 from ceph/wip-9696

PG::choose_acting: in mixed cluster case, acting may include backfill

Reviewed-by: Sage Weil <sage@redhat.com>
PGLog::IndexedLog::trim(): rollback_info_trimmed_to_riter may be log.rend()

Fixes: #9731
Backport: giant, firefly
Signed-off-by: Samuel Just <sam.just@inktank.com>
osdc/Objecter: fix tick() session locking

We need to take the session read lock before traversing the ops lists.

Fixes: #9706
Signed-off-by: Sage Weil <sage@redhat.com>
osdc/Objecter: fix use-after-frees in close_session, shutdown

For,  linger ops, _session_linger_op_remove invalidates our iterator; add
it to the list first.  Same goes for the others.

Signed-off-by: Sage Weil <sage@redhat.com>
osd/osd_types: consider CRUSH_ITEM_NONE in check_new_interval() min_size check

Fixes: #9718
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
The fix for issue 9614 was not completed, as a result, for those erasure coded PGs with one OSD down, the state was wrongly marked as active+clean+degraded. This patch makes sure the clean flag is not set for such PG.
Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7

The || instead of && had it always installed. That was fixed in EPEL
already.

http://tracker.ceph.com/issues/9747 Fixes: #9747

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 5ff4a850a0d809b3f25988c6cceb82c35095ef84)
Merge pull request #2707 from ceph/wip-9731

PGLog::IndexedLog::trim(): rollback_info_trimmed_to_riter may be log.ren...

Reviewed-by: Sage Weil <sage@redhat.com>
mds: fix inotable initialization/reset

interval_set::insert takes arguments start and len, not end.

Signed-off-by: Henry C Chang <henry.cy.chang@gmail.com>
(cherry picked from commit c95bb5943450be95e4302e35b3e2df68a6fc34bd)
Merge pull request #2719 from ceph/wip-inotable-init

mds: fix inotable initialization/reset

Reviewed-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Merge pull request #2702 from ceph/wip-9706

objecter: fix session locking, use after frees (#9706)

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
qa/workunits/rbd/import_export.sh: be case insensitive

Stop tripping over this change (from dumpling).

Signed-off-by: Sage Weil <sage@redhat.com>
mds: reply -EOPNOTSUPP for unknown lock type

Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit 675392335c53ff7879031fb9184e4f35bcc90fe2)
Merge pull request #2740 from ceph/giant-unknown-locktype

mds: reply -EOPNOTSUPP for unknown lock type
Merge pull request #2711 from guangyy/wip-9614-followup

Follow-up fix for 9614

Reviewed-by: Samuel Just <sam.just@inktank.com>