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: send FLUSH_SOURCE_INTERNAL when do copy/deep_copy. #43659
librbd: send FLUSH_SOURCE_INTERNAL when do copy/deep_copy. #43659
Conversation
retest this please |
jenkins test make check |
retest this please |
retest this please |
jenkins test make check |
c61dbc1
to
8331cc5
Compare
jenkins test make check |
1 similar comment
jenkins test make check |
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.
In general I think it is correct. I have some minor questions about the fix implementation details though.
-
As it is "persistent cache" specific, wouldn't it better to do this flush only for this case? I don't think it matters much on practice but at least it would be less confusing for an occasional code reader why we have this.
-
In the deep copy case, wouldn't it better to add this flush to
DeepCopyRequest
instead? -
Wouldn't be more correct not only flush but entirely disable the pwl cache when copying? (Ideally, switch to "write through" mode). Again, I don't think it would make much difference on practice. Just a note to consider.
For "As it is "persistent cache" specific, wouldn't it better to do this flush only for this case? I don't think it matters much on practice but at least it would be less confusing for an occasional code reader why we have this."
In fact, flush login copy from https://github.com/ceph/ceph/blob/master/src/librbd/api/DiffIterate.cc#L167-L181. I'm not family with librbd other part.
I'll try.
Yes, but this need user to know much. In fact cache is inner part. For example, write one image w/ pwl. Host restart and data can't flush to osd. After restart, user do copy. By your method, it should firstly flush data to osd then using write_through or disable pwl cache. |
1acb2b5
to
2c38f39
Compare
@trociny for " In the deep copy case, wouldn't it better to add this flush to
|
You need to wrap |
Ok. Taking we already have a precedence of doing this in |
jenkins test api |
1 similar comment
jenkins test api |
copy/deep_copy use object_map to judge whether object exist. If w/ librbdo pwl cache, flush can't flush data to osd which change objectmap state. So we should send flush w/ FLUSH_SOURCE_INTERNAL to make data flush to osd. Fixes:https://tracker.ceph.com/issues/53057 Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
2c38f39
to
a2ae83f
Compare
jenkins test api |
@ideepika update. |
@majianpeng is this related to #43127 (comment) as well? |
|
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.
@majianpeng can you amend commit title to PR title, lgtm ! thanks!
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
@majianpeng intial tests looks good: https://pulpito.ceph.com/ideepika-2021-11-01_18:01:37-rbd-wip-deepika2-testing-2021-11-01-1948-distro-basic-smithi/ |
Sorry omit your comments. update, please review. |
@majianpeng mind taking a look into https://tracker.ceph.com/issues/53108 seems not related but still new failure seen recently |
@ideepika remembered a question about objectmap. When write after discard, objectmap maybe omit discard command: |
copy/deep_copy use object_map to judge whether object exist.
If w/ librbdo pwl cache, flush can't flush data to osd which change
objectmap state. So we should send flush w/ FLUSH_SOURCE_INTERNAL to
make data flush to osd.
Fixes:https://tracker.ceph.com/issues/53057
Signed-off-by: Jianpeng Ma jianpeng.ma@intel.com
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox