rados: do not dump usage on invalid command

I hate this; it makes it impossible to see that there was an error message.

We made this same change a while back with rbd.

Signed-off-by: Sage Weil <sage@inktank.com>
rbd: be helpful with invalid command

$ rbd asdf
rbd: error parsing command 'asdf'; -h or --help for usage

Signed-off-by: Sage Weil <sage@inktank.com>
osd/osd_types: bump encoding from 11 -> 12

Meant to do this in a1b82f2a568ba211601c12b0b33474e982a3be6f or
d421b66293fb3d815ad2cd4c787dd2c39f48d6e8 but forgot!

Signed-off-by: Sage Weil <sage@inktank.com>
doc: Fixed a few typos.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
crush: invalidate rmap on create (and thus decode)

If we have an existing CrushWrapper object and decode from a bufferlist,
reset build_rmaps so that they get rebuilt.

Remove the build_rmaps() all in decode that was useless on a redecode
(because have_rmaps == true in that case and it did nothing).

Fixes: #6442
Backport: dumpling, maybe cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Merge remote-tracking branch 'gh/next'

Conflicts:
	PendingReleaseNotes
Merge pull request #673 from liewegas/wip-usage

make rbd, rados bad command errors more friendly
osd/osd_types: add object_info_t::FLAG_DIRTY

Signed-off-by: Sage Weil <sage@inktank.com>
osd/osd_types: object_info_t::get_flag_string()

Stop adding these ad-hoc to the operator<<.

Signed-off-by: Sage Weil <sage@inktank.com>
osd/ReplicatedPG: mark objects dirty in make_writeable()

Signed-off-by: Sage Weil <sage@inktank.com>
doc: Incorporated some feedback.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
ReplicatedPG: copy: take an ObjectContextRef in start_copy and use that

Signed-off-by: Greg Farnum <greg@inktank.com>
ReplicatedPG: copy: specify the temp_oid in the caller

Signed-off-by: Greg Farnum <greg@inktank.com>
ReplicatedPG: copy: split up the transaction generation from the PG management

Signed-off-by: Greg Farnum <greg@inktank.com>
osdc/Objecter: fix return value for copy_get

We should return the return code even when we don't have an encoding error!

Signed-off-by: Sage Weil <sage@inktank.com>
ReplicatedPG: copy: start defining CopyCallback structures

Outline the basic interfaces we're going to use, and implement
the more obvious ones.

Signed-off-by: Greg Farnum <greg@inktank.com>
ReplicatedPG: copy: add CopyCallback pointer to CopyOp, and set it up

We'll start using it in the next commit; eventually we can use the interfaces
we're putting their to replace our link to the OpContext.

Signed-off-by: Greg Farnum <greg@inktank.com>
ReplicatedPG: copy: implement CopyFromCallback::finish, remove CopyOp::ctx

We implement enough of the CopyFromCallback that CopyOp no longer needs
a direct reference to the OpContext, so we remove it and replace all
references with calls to cop->cb->complete().

Signed-off-by: Greg Farnum <greg@inktank.com>
osd: add ISDIRTY, UNDIRTY rados operations

ISDIRTY will query whether the dirty flag is set on an object.  UNDIRTY
will explicitly clear it.  Note that a user doing so will likely run amok
with the caching code.

Signed-off-by: Sage Weil <sage@inktank.com>
Merge pull request #675 from ceph/wip-osd-dirty

osd: add a dirty flag for objects.

Reviewed-by: Samuel Just <sam.just@inktank.com>