mgr/volumes: Use operation type during subvolume open
Subvolume open currently takes in 2 optional parameters to
denote desired state and type. This enables the open to
allow the operation to suceed based on the (type, state)
tuple.
Instead, pass an operation type to be performed on a subvolume
during open, and decide internal to a subvolume version if the
operation is allowed based on its state and type.
Also modifies the state machine code, to be more amenable to
modifications and improves redability.
Signed-off-by: Shyamsundar Ranganathan <srangana@redhat.com>
(cherry picked from commit
f380bf79435ccae21df12d19e530ef0d89a5cc8d)
Conflicts:
src/pybind/mgr/volumes/fs/operations/op_sm.py
subvol pin operation is not backported, required manual resolution
src/pybind/mgr/volumes/fs/volume.py
mypy type checks are not backported, required manual resolution