Project

General

Profile

Actions

Bug #39455

closed

"rbd diff" reports diff on freshly-created image

Added by Nathan Cutler about 5 years ago. Updated about 5 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

While working on #39447 I was surprised to find that "rbd diff" reports a diff in the following case:

Starting from a freshly deployed nautilus cluster:

ceph osd pool create rbd 30 30 replicated
dd if=/bin/sh of=/tmp/img1 bs=1k count=1 seek=10
dd if=/bin/dd of=/tmp/img1 bs=1k count=10 seek=100
dd if=/bin/rm of=/tmp/img1 bs=1k count=100 seek=1000
dd if=/bin/ls of=/tmp/img1 bs=1k seek=10000
dd if=/bin/ln of=/tmp/img1 bs=1k seek=100000
rbd import /tmp/img1 testimg1
rbd diff testimg1

The last command produces the following output:

# rbd diff testimg1
Offset    Length  Type 
0         1089536 data 
8388608   1986560 data 
100663296 1805336 data 

My expectation based on reading the rbd manpage ("diff - Dump a list of byte extents in the image that have changed since the specified start snapshot, or since the image was created") would be that the command would not produce any output (i.e., no diff).

If I then make a snapshot and diff against the snapshot, the behavior is as expected:

# rbd snap create testimg1 --snap=snap1
# rbd diff --from-snap=snap1 testimg1 
#

Related issues 1 (0 open1 closed)

Related to rbd - Bug #39447: [tests] "rbd" teuthology suite has no coverage of "rbd diff"ResolvedNathan Cutler04/24/2019

Actions
Actions

Also available in: Atom PDF