This will disable features that are dependent upon exclusive ownership
of the image.
-.. option:: --object-extents
+.. option:: --whole-object
Specifies that the diff should be limited to the extents of a full object
instead of showing intra-object deltas. When the object map feature is
The --stripe-unit and --stripe-count arguments are optional, but must be
used together.
-:command:`export-diff` [--from-snap *snap-name*] [--object-extents] (*image-spec* | *snap-spec*) *dest-path*
+:command:`export-diff` [--from-snap *snap-name*] [--whole-object] (*image-spec* | *snap-spec*) *dest-path*
Exports an incremental diff for an image to dest path (use - for stdout). If
an initial snapshot is specified, only changes since that snapshot are included; otherwise,
any regions of the image that contain data are included. The end snapshot is specified
continuing. If there was an end snapshot we verify it does not already exist before
applying the changes, and create the snapshot when we are done.
-:command:`diff` [--from-snap *snap-name*] [--object-extents] *image-spec* | *snap-spec*
+:command:`diff` [--from-snap *snap-name*] [--whole-object] *image-spec* | *snap-spec*
Dump a list of byte extents in the image that have changed since the specified start
snapshot, or since the image was created. Each output line includes the starting offset
(in bytes), the length of the region (in bytes), and either 'zero' or 'data' to indicate
" \"rbd/$(basename <path>)\" is\n"
" assumed for <image-spec> if\n"
" omitted\n"
-" diff [--from-snap <snap-name>] [--object-extents]\n"
+" diff [--from-snap <snap-name>] [--whole-object]\n"
" <image-spec> | <snap-spec> print extents that differ since\n"
" a previous snap, or image creation\n"
-" export-diff [--from-snap <snap-name>] [--object-extents]\n"
+" export-diff [--from-snap <snap-name>] [--whole-object]\n"
" (<image-spec> | <snap-spec>) <path> export an incremental diff to\n"
" path, or \"-\" for stdout\n"
" merge-diff <diff1> <diff2> <path> merge <diff1> and <diff2> into\n"
}
static int do_export_diff(librbd::Image& image, const char *fromsnapname,
- const char *endsnapname, bool object_extents,
+ const char *endsnapname, bool whole_object,
const char *path)
{
int r;
}
ExportContext ec(&image, fd, info.size);
- r = image.diff_iterate2(fromsnapname, 0, info.size, true, object_extents,
+ r = image.diff_iterate2(fromsnapname, 0, info.size, true, whole_object,
export_diff_cb, (void *)&ec);
if (r < 0)
goto out;
}
static int do_diff(librbd::Image& image, const char *fromsnapname,
- bool object_extents, Formatter *f)
+ bool whole_object, Formatter *f)
{
int r;
librbd::image_info_t info;
om.t->define_column("Type", TextTable::LEFT, TextTable::LEFT);
}
- r = image.diff_iterate2(fromsnapname, 0, info.size, true, object_extents,
+ r = image.diff_iterate2(fromsnapname, 0, info.size, true, whole_object,
diff_cb, &om);
if (f) {
f->close_section();
long long stripe_unit = 0, stripe_count = 0;
long long bench_io_size = 4096, bench_io_threads = 16, bench_bytes = 1 << 30;
string bench_pattern = "seq";
- bool diff_object_extents = false;
+ bool diff_whole_object = false;
std::string val, parse_err;
std::ostringstream err;
output_format = strdup(val.c_str());
output_format_specified = true;
}
- } else if (ceph_argparse_flag(args, i, "--object-extents", (char *)NULL)) {
- diff_object_extents = true;
+ } else if (ceph_argparse_flag(args, i, "--whole-object", (char *)NULL)) {
+ diff_whole_object = true;
} else if (ceph_argparse_binary_flag(args, i, &pretty_format, NULL, "--pretty-format", (char*)NULL)) {
} else {
++i;
break;
case OPT_DIFF:
- r = do_diff(image, fromsnapname, diff_object_extents, formatter.get());
+ r = do_diff(image, fromsnapname, diff_whole_object, formatter.get());
if (r < 0) {
cerr << "rbd: diff error: " << cpp_strerror(-r) << std::endl;
return -r;
break;
case OPT_EXPORT_DIFF:
- r = do_export_diff(image, fromsnapname, snapname, diff_object_extents, path);
+ r = do_export_diff(image, fromsnapname, snapname, diff_whole_object, path);
if (r < 0) {
cerr << "rbd: export-diff error: " << cpp_strerror(-r) << std::endl;
return -r;