Skip to content
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 create timestamp metadata for image #15757

Merged
merged 5 commits into from Jun 22, 2017

Conversation

Projects
None yet
3 participants
@runsisi
Copy link
Contributor

runsisi commented Jun 19, 2017

Signed-off-by: runsisi runsisi@zte.com.cn

@runsisi runsisi force-pushed the runsisi:wip-image-ts branch from ab685ce to 21ba3b6 Jun 19, 2017

@dillaman dillaman self-requested a review Jun 19, 2017

@runsisi

This comment has been minimized.

Copy link
Contributor Author

runsisi commented Jun 20, 2017

retest this please

@@ -223,19 +223,23 @@ int create(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
bufferlist featuresbl;
bufferlist object_prefixbl;
bufferlist snap_seqbl;
bufferlist creation_timestampbl;

This comment has been minimized.

Copy link
@dillaman

dillaman Jun 20, 2017

Contributor

Nit: perhaps change creation_xyz to just create_xyz throughout

*result = cls_client::get_creation_timestamp_finish(&it,
&m_image_ctx->creation_timestamp);
}
if (*result == -EOPNOTSUPP) {

This comment has been minimized.

Copy link
@dillaman

dillaman Jun 20, 2017

Contributor

Nit: you can drop this no-op clause and just update the next conditional to (*result < 0 && *result != -EOPNOTSUPP)

if (f) {
f->dump_string("creation_timestamp", creation_timestamp_str);
} else {
std::cout << "\tcreation_timestamp: " << creation_timestamp_str

This comment has been minimized.

Copy link
@dillaman

dillaman Jun 20, 2017

Contributor

Nit: only display if you actually have a timestamp

@@ -228,6 +228,7 @@ cdef extern from "rbd/librbd.h" nogil:
uint8_t enabled)
int rbd_get_stripe_unit(rbd_image_t image, uint64_t *stripe_unit)
int rbd_get_stripe_count(rbd_image_t image, uint64_t *stripe_count)
int rbd_get_timestamp(rbd_image_t image, timespec *timestamp)

This comment has been minimized.

Copy link
@dillaman

dillaman Jun 20, 2017

Contributor

Nit: delete from this commit

runsisi added some commits Apr 21, 2017

runsisi
librbd: add create timestamp metadata for image
Signed-off-by: runsisi <runsisi@zte.com.cn>
runsisi
rbd: include create timestamp for info command
Signed-off-by: runsisi <runsisi@zte.com.cn>
runsisi
pybind/rbd: add support for image create timestamp
Signed-off-by: runsisi <runsisi@zte.com.cn>
runsisi
test/unittest_rbd: add unit tests for image create timestamp
Signed-off-by: runsisi <runsisi@zte.com.cn>
runsisi
test/cli-integration/rbd: verify formatting for image create timestamp
Signed-off-by: runsisi <runsisi@zte.com.cn>

@runsisi runsisi force-pushed the runsisi:wip-image-ts branch from 21ba3b6 to c37b700 Jun 20, 2017

@runsisi

This comment has been minimized.

Copy link
Contributor Author

runsisi commented Jun 20, 2017

@dillaman updated as you suggested, thanks!

@dillaman dillaman changed the title librbd: add creation timestamp metadata for image librbd: add create timestamp metadata for image Jun 20, 2017

@dillaman
Copy link
Contributor

dillaman left a comment

lgtm

@dillaman dillaman merged commit fee2ea1 into ceph:master Jun 22, 2017

3 of 4 checks passed

arm64 make check arm64 make check failed
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details

@runsisi runsisi deleted the runsisi:wip-image-ts branch Jun 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.