client: cancel all ops on full flag

Signed-off-by: John Spray <john.spray@redhat.com>
osdc/Objecter: add have_map method

This is for places we're going to call wait_for_map, so
that we can easily check if we will *probably* get
a true from wait_for_map, and thereby avoid
allocating Contexts we won't need.

Signed-off-by: John Spray <john.spray@redhat.com>
messages: add osd_epoch_barrier to cap msgs

Extension to client-server protocol to allow clients
to release capabilities conditional on the receiver
having a particular OSD map, and the MDS to issue
caps conditional on the user having a particular
OSD map.

Signed-off-by: John Spray <john.spray@redhat.com>
client: track osd epoch barrier

Signed-off-by: John Spray <john.spray@redhat.com>
mds: implement osd epoch barrier on caps

Signed-off-by: John Spray <john.spray@redhat.com>
mds: add 'osdmap barrier' admin command

This is for use with client eviction.

Signed-off-by: John Spray <john.spray@redhat.com>
messages: always encode barrier

Instead of truncating on INLINE_DATA, send
some blank fields there for clients that
don't support it (the kclient) in order
that we can include the following
epoch_barrier field.

Signed-off-by: John Spray <john.spray@redhat.com>
osdc: continuously subscribe to osd map on pause

We were doing this on FULL, should also have done it
on PAUSERD and PAUSEWR, to avoid paused requests
staying that way forever.

Signed-off-by: John Spray <john.spray@redhat.com>
client: add 'status' asok

Useful in test/debug for querying OSD epoch
and OSD barrier epoch.

Signed-off-by: John Spray <john.spray@redhat.com>
mds: set epoch barrier on transition to active

To handle case where MDSs restart after experiencing
a barrier-inducing operation: rather than persisting
OSD barrier somewhere, just have the MDSs always barrier
on latest OSD epoch at startup.

Effect is that after restart, MDS cap issues will
be delayed in (compliant) clients until the client
sees the latest OSD map.

Signed-off-by: John Spray <john.spray@redhat.com>