New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
librbd: add preliminary support for new operation feature bit #19903
Conversation
5c789ec
to
186f690
Compare
The layering and data-pool features are enabled automatically when striping or a data pool is specified, respectively. For the 'rbd feature XYZ' command, hide all non-mutable features. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
186f690
to
efbe323
Compare
m_image_ctx.object_prefix = std::move(m_object_prefix); | ||
m_image_ctx.init_layout(); | ||
} else { | ||
m_image_ctx.features = m_features; | ||
m_image_ctx.flags = m_flags; | ||
m_image_ctx.op_features = m_op_features; | ||
m_image_ctx.operations_disabled = ( | ||
(m_op_features & ~RBD_OPERATION_FEATURES_ALL) != 0ULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dillaman I am not sure I quite understand how it is going to be used. This looks like it should have been explained in the commit 3fe7a2a log message, which looks like truncated.
So operations_disabled
is true, when m_op_features contains an unknown bit, i.e. we are an older client. Then we can't do any operations? Probably, I will need just to wait for the next PR to see a use case )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I fixed the truncated commit message. The goal is to avoid introducing individual feature bits that break older clients when the older clients can still safely read and write to the image but they won't know how to properly handle some new feature. The two immediate examples will be (1) cloning v2 where snapshots will be unprotected so we cannot let an older client delete a clone that uses the new format and (2) image groups where we cannot let images be removed when they are part of a group w/o cleaning up.
This will initially be utilized to restrict older clients from performing operations against an image if (1) it doesn't support the new feature bit, or (2) doesn't support the specific enabled op feature. Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
efbe323
to
ffdb653
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Mimic introduced RBD_FEATURE_OPERATIONS feature (PR ceph#19903), which dashboard_v2 supports. This was backported by 3c175d2 (a cherry-pick of 5056cba). This change disables that support, as long as there's no plan to backport that RBD feature. Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced in PR: ceph#19903, 209f6fc) Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced in PR: ceph#19903, 209f6fc) Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced in PR: ceph#19903, 209f6fc) Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced in PR: ceph#19903, 209f6fc) Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced in PR: ceph#19903, 209f6fc) Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced in PR: ceph#19903, 209f6fc) Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced in PR: ceph#19903, 209f6fc) Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Disable support for RBD_FEATURE_OPERATIONS in rbd controller (introduced in PR: ceph#19903, 209f6fc) Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
This feature bit will be used to disable operations (e.g. clone, snap create