Skip to content

cephfs: implement snapdiff#43546

Merged
ifed01 merged 5 commits intoceph:mainfrom
ifed01:wip-ifed-snapdiff3-good
Apr 13, 2023
Merged

cephfs: implement snapdiff#43546
ifed01 merged 5 commits intoceph:mainfrom
ifed01:wip-ifed-snapdiff3-good

Conversation

@ifed01
Copy link
Contributor

@ifed01 ifed01 commented Oct 14, 2021

This patch supersedes both #42517 and #43328 and implements API to access snapshot delta (aka snapdiff) via
new libcephfs API method: readdir_snapdiff.

New test cases "LibCephFS.SnapDiff*" can serve as an example of new API calls.

Signed-off-by: Igor Fedotov igor.fedotov@croit.io
Signed-off-by: Denis Barahtanov denis.barahtanov@croit.io

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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

@ifed01
Copy link
Contributor Author

ifed01 commented Oct 15, 2021

jenkins test make check

@vshankar
Copy link
Contributor

@ifed01 I most likely have some unpublished comments in the other pr by @denisb-croit.

I'll go through this anyway.

@vshankar
Copy link
Contributor

jenkins test make check arm64

@ifed01
Copy link
Contributor Author

ifed01 commented Nov 8, 2021

@vshankar - gentle reminder about the PR ;)

@vshankar
Copy link
Contributor

@vshankar - gentle reminder about the PR ;)

ACK.

@vshankar
Copy link
Contributor

jenkins test make check arm64

1 similar comment
@vshankar
Copy link
Contributor

vshankar commented Dec 2, 2021

jenkins test make check arm64

@vshankar vshankar self-assigned this Dec 2, 2021
@vshankar
Copy link
Contributor

vshankar commented Dec 6, 2021

@ifed01 - sorry for the delay. I have started reviewing and testing these changes starting last Friday - will let you know how things go.

BTW, I'm planning to include these changes once quincy is branched off. I hope that is ok?

@ifed01
Copy link
Contributor Author

ifed01 commented Dec 6, 2021

@ifed01 - sorry for the delay. I have started reviewing and testing these changes starting last Friday - will let you know how things go.
No worries, thanks in advance.

BTW, I'm planning to include these changes once quincy is branched off. I hope that is ok?
Sure.

@ifed01
Copy link
Contributor Author

ifed01 commented Dec 20, 2021

@vshankar - any updates? ;)

@ifed01 ifed01 force-pushed the wip-ifed-snapdiff3-good branch from 9a11e6e to 7bad085 Compare December 20, 2021 17:13
Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ifed01 I have mostly reviewed changes in MDS in Denis's original PR which are carry-forwarded in this PR, so, just commenting on the interface for now...

(I have tried playing/testing the original PR which worked well)

* is empty. This pointer should not be freed by the caller, and is only safe to
* access between return and the next call to ceph_readdir or ceph_closedir.
*/
int ceph_readdir_snapdiff(struct ceph_mount_info* cmount,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's looks a bit unusual to pass in the snap-id of the other snapshot against which the delta has to be built. Could this be the snapshot name?

FWIW, this interface can accept two directory stream pointers (one for each snapshot) and a path for which the entries are to be built.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ifed01 @batrick I'm open to suggestions on how the API would look like? Basically, I would like to avoid passing in snap-ids if possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vshankar - I've reworked the API to accept snapshot root(!) dir stream pointer instead of snapid.
There is still a snapid returned by the function to distinguish removed and existing entries. Probably we can get rid off it as well and replace with an explicit bool flag... Do you think we need should do that?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think better would be to create an API for building a snapdiff stream. Something like:

snapdiff_result_t* opensnapdiff(snappath1, snappath2);

Do sanity checks like same dir inode. Save snapids.

int readdir_snapdiff(snapdiff_result_t*, snapid_t* res_snap);

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@batrick - I refactored this part a bit, please take a look. Is that what you suggested?

@ifed01
Copy link
Contributor Author

ifed01 commented Jan 4, 2022

@ifed01 I have mostly reviewed changes in MDS in Denis's original PR which are carry-forwarded in this PR, so, just commenting on the interface for now...
@vshankar - thanks for taking a look. Could you please elaborate what PR are you referring as the original one: #42517 (which has got just the "tilda" interface) or #43328 (which is a dual-API evolution). I can't see any comments from your side for the latter - is it that good or you just haven't publish the comments? ;)

@vshankar
Copy link
Contributor

vshankar commented Jan 4, 2022

@vshankar - thanks for taking a look. Could you please elaborate what PR are you referring as the original one: #42517 (which has got just the "tilda" interface) or #43328 (which is a dual-API evolution). I can't see any comments from your side for the latter - is it that good or you just haven't publish the comments? ;)

I'm talking about Denis's PR #42517 where I had some comments that Denis took care of.

@github-actions
Copy link

github-actions bot commented Jan 5, 2022

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@ifed01 ifed01 force-pushed the wip-ifed-snapdiff3-good branch from 7bad085 to 8e38b9c Compare January 10, 2022 12:52
@ifed01 ifed01 force-pushed the wip-ifed-snapdiff3-good branch from 8e38b9c to b317848 Compare January 10, 2022 13:15
@ifed01
Copy link
Contributor Author

ifed01 commented Jan 10, 2022

jenkins test make check

@ifed01
Copy link
Contributor Author

ifed01 commented Jan 10, 2022

@vshankar - thanks for taking a look. Could you please elaborate what PR are you referring as the original one: #42517 (which has got just the "tilda" interface) or #43328 (which is a dual-API evolution). I can't see any comments from your side for the latter - is it that good or you just haven't publish the comments? ;)

I'm talking about Denis's PR #42517 where I had some comments that Denis took care of.

It looks like those comments have been answered/resolved? Do you see anything still open for discussion there ?

@vshankar vshankar requested a review from batrick January 12, 2022 05:05
@ifed01
Copy link
Contributor Author

ifed01 commented Apr 10, 2023

jenkins test make check

@ifed01
Copy link
Contributor Author

ifed01 commented Apr 10, 2023

jenkins test ceph windows tests

@ifed01
Copy link
Contributor Author

ifed01 commented Apr 10, 2023

jenkins test ceph windows

@ifed01
Copy link
Contributor Author

ifed01 commented Apr 10, 2023

jenkins test windows

Signed-off-by: Igor Fedotov <igor.fedotov@croit.io>
@ifed01 ifed01 force-pushed the wip-ifed-snapdiff3-good branch from 3661d13 to 3e88c6b Compare April 10, 2023 19:43
@vshankar
Copy link
Contributor

jenkins retest this please

@petrutlucian94
Copy link
Contributor

jenkins test windows

@petrutlucian94
Copy link
Contributor

I'm seeing some unrelated Windows test timeouts, will look into it.

@ifed01
Copy link
Contributor Author

ifed01 commented Apr 12, 2023

jenkins test windows

@petrutlucian94
Copy link
Contributor

Thanks for issuing a Windows recheck. For what is worth, the Windows job is currently failing due to an unrelated regression: #51043

@ifed01
Copy link
Contributor Author

ifed01 commented Apr 12, 2023

Thanks for issuing a Windows recheck. For what is worth, the Windows job is currently failing due to an unrelated regression: #51043

OK, good to know. Thanks!

@vshankar
Copy link
Contributor

Thanks for issuing a Windows recheck. For what is worth, the Windows job is currently failing due to an unrelated regression: #51043

Thx @petrutlucian94. Since the failure is unrelated, this is good to merge then :)

@ifed01 ifed01 dismissed stale reviews from petrutlucian94 and batrick April 13, 2023 09:25

Comments resolved

@ifed01 ifed01 merged commit 3db83ad into ceph:main Apr 13, 2023
@ifed01
Copy link
Contributor Author

ifed01 commented Apr 13, 2023

Thanks for issuing a Windows recheck. For what is worth, the Windows job is currently failing due to an unrelated regression: #51043

Thx @petrutlucian94. Since the failure is unrelated, this is good to merge then :)

OK, I'm going ahead and merge.. Thanks a lot to everyone involved ;)

@ifed01 ifed01 deleted the wip-ifed-snapdiff3-good branch April 13, 2023 14:35
yuvalif pushed a commit to yuvalif/ceph that referenced this pull request Apr 30, 2023
cephfs: implement snapdiff

Reviewed-by: Venky Shankar <vshankar@redhat.com>
cbodley added a commit to cbodley/ceph that referenced this pull request Jul 20, 2023
* use a fixture for setup_test()
* invoke test_cephfs.py with pytest

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 0bd813f)

Conflicts:
	src/test/pybind/test_cephfs.py
		missing ceph#43546
		missing ceph#46905
@ifed01 ifed01 mentioned this pull request Aug 30, 2023
14 tasks
cbodley added a commit to cbodley/ceph that referenced this pull request Jan 4, 2024
* use a fixture for setup_test()
* invoke test_cephfs.py with pytest

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 0bd813f)

Conflicts:
	src/test/pybind/test_cephfs.py
		missing ceph#43546
		missing ceph#46905
cbodley added a commit to cbodley/ceph that referenced this pull request Jan 5, 2024
* use a fixture for setup_test()
* invoke test_cephfs.py with pytest

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 0bd813f)

Conflicts:
	src/test/pybind/test_cephfs.py
		missing ceph#43546
		missing ceph#46905
cbodley added a commit to cbodley/ceph that referenced this pull request Jan 10, 2024
* use a fixture for setup_test()
* invoke test_cephfs.py with pytest

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 0bd813f)

Conflicts:
	src/test/pybind/test_cephfs.py
		missing ceph#43546
		missing ceph#46905
rishabh-d-dave pushed a commit to rishabh-d-dave/ceph that referenced this pull request Jan 29, 2024
* use a fixture for setup_test()
* invoke test_cephfs.py with pytest

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 0bd813f)

Conflicts:
	src/test/pybind/test_cephfs.py
		missing ceph#43546
		missing ceph#46905
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants