Bug #42248
closedrbd export-diff with --whole-object skips parent data for fast-diff enabled images
0%
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.
Updated by Greg Farnum over 4 years ago
- Project changed from Ceph to rbd
- Category deleted (
librbd)
Updated by Jason Dillaman over 4 years ago
- Status changed from New to In Progress
- Assignee set to Jason Dillaman
- Backport set to luminous,mimic,nautilus
Updated by Jason Dillaman over 4 years ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 32403
Updated by Mykola Golub over 4 years ago
- Status changed from Fix Under Review to Pending Backport
Updated by Nathan Cutler over 4 years ago
- Copied to Backport #43474: nautilus: rbd export-diff with --whole-object skips parent data for fast-diff enabled images added
Updated by Nathan Cutler over 4 years ago
- Copied to Backport #43475: mimic: rbd export-diff with --whole-object skips parent data for fast-diff enabled images added
Updated by Nathan Cutler over 4 years ago
- Copied to Backport #43476: luminous: rbd export-diff with --whole-object skips parent data for fast-diff enabled images added
Updated by Nathan Cutler over 3 years ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".
Updated by David Herselman almost 3 years ago
The resulting patch appears to break snap to snap comparisons when appending the 'whole-object' option. This option exists to limit diffs to whole (generally 4 MiB) objects.
Details here:
https://tracker.ceph.com/issues/50787
Updated by Ilya Dryomov almost 3 years ago
- Related to Bug #50787: rbd diff between two snapshots lists entire image content with 'whole-object' switch added