Project

General

Profile

Actions

Bug #42248

closed

rbd export-diff with --whole-object skips parent data for fast-diff enabled images

Added by Nikola Ciprich over 4 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Jason Dillaman
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
luminous,mimic,nautilus
Regression:
No
Severity:
2 - major
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

we've noticed, that when we create snapshot of fast-diff enabled image,
and then export diff with --whole-object parameter, exported data seem
to be incorrect..

steps to reproduce:

[root@showboxv1a ~]# dd if=/dev/zero of=/tmp/disk.img bs=1M count=1
[root@showboxv1a ~]# mkfs.ext4 /tmp/disk.img
[root@showboxv1a ~]# rbd import /tmp/disk.img sata/mkr-test1

[root@showboxv1a ~]# rbd info sata/mkr-test1
rbd image 'mkr-test1':
size 1 MiB in 1 objects
order 22 (4 MiB objects)
id: 0ed94a6b8b4567
block_name_prefix: rbd_data.0ed94a6b8b4567
format: 2
features: layering, exclusive-lock, object-map, fast-diff,
deep-flatten
op_features:
flags:
create_timestamp: Thu Sep 19 16:07:42 2019

[root@showboxv1a ~]# rbd du sata/mkr-test1
NAME PROVISIONED USED
mkr-test1 1 MiB 1 MiB

[root@showboxv1a ~]# rbd export-diff sata/mkr-test1 - | wc -c
Exporting image: 100% complete...done.
45095

[root@showboxv1a ~]# rbd export-diff sata/mkr-test1 - --whole-object | wc
-c
Exporting image: 100% complete...done.
1048615

- this is OK

[root@showboxv1a ~]# rbd snap create sata/mkr-test1@snap1
[root@showboxv1a ~]# rbd snap protect sata/mkr-test1@snap1
[root@showboxv1a ~]# rbd clone sata/mkr-test1@snap1 sata/mkr-test1b

[root@showboxv1a ~]# rbd du sata/mkr-test1b
NAME PROVISIONED USED
mkr-test1b 1 MiB 0 B

[root@showboxv1a ~]# rbd export-diff sata/mkr-test1b - | wc -c
Exporting image: 100% complete...done.
45095

this is OK too

[root@showboxv1a ~]# rbd export-diff sata/mkr-test1b - --whole-object | wc
-c
Exporting image: 100% complete...done.
22

- this is wrong, size should apparently be larger

or do we get all this wrong?

problem is reproducible for both 13.2.6 and 14.2.3, host OS is x86_64 centos 7.


Related issues 4 (0 open4 closed)

Related to rbd - Bug #50787: rbd diff between two snapshots lists entire image content with 'whole-object' switchResolvedSunny Kumar

Actions
Copied to rbd - Backport #43474: nautilus: rbd export-diff with --whole-object skips parent data for fast-diff enabled imagesResolvedActions
Copied to rbd - Backport #43475: mimic: rbd export-diff with --whole-object skips parent data for fast-diff enabled imagesResolvedActions
Copied to rbd - Backport #43476: luminous: rbd export-diff with --whole-object skips parent data for fast-diff enabled imagesRejectedActions
Actions

Also available in: Atom PDF