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 almost 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 #1

Updated by Greg Farnum over 4 years ago

  • Project changed from Ceph to rbd
  • Category deleted (librbd)
Actions #2

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
Actions #3

Updated by Jason Dillaman over 4 years ago

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 32403
Actions #4

Updated by Mykola Golub over 4 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #5

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
Actions #6

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
Actions #7

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
Actions #8

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".

Actions #9

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

Actions #10

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
Actions

Also available in: Atom PDF