Revert "client: invalidate kernel dentries one by one"

This reverts commit 491da5173fc33fec944865f0e2e9a506ec71fc5b.

Since 3.18 kernel, d_invalidate() unhash dentry even when it's
in use. If dentry of process' working directory is invalidated,
calling getcwd(3) will return -ENOENT.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
client: cleanup client callback registration

Signed-off-by: Yan, Zheng <zyan@redhat.com>
client: use remount to trim kernel dcache

when remounting a file system, linux kernel trims all unused dentry
in the file system.

Fixes: #10277
Signed-off-by: Yan, Zheng <zyan@redhat.com>
SimpleMessenger: Retry binding on addresses if binding fails

If binding on a IP-Address fails, delay and retry again.

This happens mainly on IPv6 deployments. Due to DAD (Duplicate Address Detection)
or SLAAC it can be that IPv6 is not yet available when the daemons start.

Monitor daemons try to bind on a static IPv6 address and that might not be available
yet and that causes the monitor not to start.

Fixes: #10029
osd: drop redundant check in handle_replica_op

This is what require_self_aliveness checks.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: pass Message* to most require_* helpers

These do nothing but op->get_req(); pass the Message* explicitly so that
non-OpRequest callers can use them.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: check that source OSD is valid for MOSDRepScrub

Make sure the message we got from the peer OSD is valid.  Specifically,
this avoids a race like this:

- A marks down B
- B sends MOSDRepScrub
- A accepts connection from B as new
- A replies to scrub
- B crashes because msgr seq 1 < expected seq 1000+

See #8880 for the most recent fix for requests.

Fixes: #9555
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
cls/refcount: ENOENT when put on non-existent object

If we get ENOENT, do not that that to mean an implicit reference count of
1.  That means that if you put a non-existent object, we should get
ENOENT instead of doing a useless delete on the OSD.

Note that this changes the get behavior slightly, too: doing a get on a
non-existent object will now fail with ENOENT instead of implicitly
creating it.

Stumbled across this from #10262.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: handle no-op write with snapshot case

If we have a transaction that does something to the object but it !exists
both before and after, we will continue through the write path.  If the
snapdir object already exists, and we try to create it again, we will
leak a snapdir obc and lock and later crash on an assert when the obc
is destroyed:

0> 2014-12-06 01:49:51.750163 7f08d6ade700 -1 osd/osd_types.h: In function 'ObjectContext::~ObjectContext()' thread 7f08d6ade700 time 2014-12-06 01:49:51.605411
osd/osd_types.h: 2944: FAILED assert(rwstate.empty())

Fix is to not recreated the snapdir if it already exists.

Fixes: #10262
Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #3173 from ceph/wip-9555

osd: fix msgr reconnect crash from MOSDRepScrub messages (bug 9555)

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Cleanup: Drop hobject_incorrect_pool

This field in MOSDSubOp, used to support very old version
OSD(MOSDSubOp header version < 7, which was introduced in
mid 2012 by commit 2fe9816305fc1406ab7fb043bbb32affffc2d190)

Now since two years pasted, we don't need it anymore.

Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com>
0.90
osdc/Objecter: do notify completion callback in fast-dispatch context

The notify completion has exactly one user, the librados caller which
does nothing but take a local (inner) lock and signal a Cond.  Do this
in the fast-dispatch context for simplicity.

Notably, this makes the notify completion (and timeout) trigger a
notify2() return (with ETIMEDOUT) even when the finisher queue that
normally delivers notify is busy.. for example with a notify that is
being very slow.  In our case, the unit test is doing a sleep(3) to
test timeouts but also prevented the ETIMEDOUT notification from
being delivered to the caller.  This patch resolves that.

Signed-off-by: Sage Weil <sage@redhat.com>
Merge remote-tracking branch 'gh/next'
doc/release-notes: v0.90

Signed-off-by: Sage Weil <sage@redhat.com>
Merge pull request #3121 from ceph/wip-10277

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
mds: add default ctor for quota_info_t

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

Signed-off-by: Loic Dachary <ldachary@redhat.com>
Merge pull request #3225 from dachary/wip-10400-quota-info-t

mds: add default ctor for quota_info_t
doc: Fixes a typo in ceph-deploy man page.

Lack of a single space was restricting the proper rendering of an option in
html. Fixes the error.

Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
doc: Adds updated ceph-deploy man page under man/

Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>