@@ -1010,15 +1010,41 @@ Note that the commands above are all non-blocking. If we want to wait for the qu
10101010to reach the `QUIESCED ` state, we should await it at some point. ``--await `` can be given
10111011along with other arguments to let the system know our intention.
10121012
1013- Technically, there are two types of await: `quiesce await ` and `release await `. The former
1014- is the default, and the latter can only be achieved with ``--release `` present in the argument list.
1015- To avoid confision, it is not permitted to issue a `quiesce await ` when the set is already `RELEASING `
1016- or `RELEASED `. Trying to ``--release `` a set that is not `QUIESCED ` is an ``EPERM `` error as well, regardless
1017- of whether await is requested alongside. However, it's not an error to `release await `
1018- an already released set, or to `quiesce await ` a `QUIESCED ` one.
1019-
1020- When awaiting, one may also specify a maximum duration that they would like this await request to block for,
1021- not affecting the two intrinsic timeouts discussed above. If the target awaited state isn't reached
1013+ There are two types of await: `quiesce await ` and `release await `. The former is the default,
1014+ and the latter can only be achieved with ``--release `` present in the argument list.
1015+ To avoid confision, it is not permitted to issue a `quiesce await ` when the set is not `QUIESCING `.
1016+ Trying to ``--release `` a set that is not `QUIESCED ` is an ``EPERM `` error as well, regardless
1017+ of whether await is requested alongside. However, it's not an error to `release await `
1018+ an already released set, or to `quiesce await ` a `QUIESCED ` one - those are successful no-ops.
1019+
1020+ Since a set is awaited after the application of the ``--await ``-augmented command, the await operation
1021+ may mask a successful result with its own error. A good example is trying to cancel-await a set:
1022+
1023+ .. prompt :: bash $ auto
1024+
1025+ $ ceph fs quiesce fs1 --set-id set1 --cancel --await
1026+ {
1027+ // ...
1028+ "sets": {
1029+ "set1": {
1030+ // ...
1031+ "state": {
1032+ "name": "CANCELED",
1033+ "age": 0
1034+ },
1035+ // ...
1036+ }
1037+ }
1038+ }
1039+ Error EPERM:
1040+
1041+ Although ``--cancel `` will succeed syncrhonously for a set in an active state, awaiting a canceled
1042+ set is not permitted, hence this call will result in an ``EPERM ``. This is deliberately different from
1043+ returning a ``EINVAL `` error, denoting an error on the user's side, to simplify the system's behavior
1044+ when ``--await `` is requested. As a result, it's also a simpler model for the user to work with.
1045+
1046+ When awaiting, one may specify a maximum duration that they would like this await request to block for,
1047+ orthogonally to the two intrinsic set timeouts discussed above. If the target awaited state isn't reached
10221048within the specified duration, then ``EINPROGRESS `` is returned. For that, one should use the argument
10231049``--await-for=<seconds> ``. One could think of ``--await `` as equivalent to ``--await-for=Infinity ``.
10241050While it doesn't make sense to specify both arguments, it is not considered an error. If
0 commit comments