Project

General

Profile

Actions

Bug #63770

closed
ID ID

[diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequest

Bug #63770: [diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequest

Added by Ilya Dryomov almost 3 years ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Due date:
% Done:

0%

Source:
Backport:
quincy,reef,squid
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Fixed In:
v19.3.0-526-g371dd06f15
Released In:
v20.2.0~3371
Upkeep Timestamp:
2025-11-01T01:20:54+00:00

Description

On an image without fast-diff feature:

$ rbd create -s 1G --image-shared foo
$ sudo rbd device map foo
/dev/rbd0
$ sudo xfs_io -d -c 'pwrite 0 2M' /dev/rbd0
wrote 2097152/2097152 bytes at offset 0
$ rbd snap create foo@snap
Creating snap: 100% complete...done.
$ sudo blkdiscard -o 1M -l 2M /dev/rbd0
$ sudo rbd device unmap /dev/rbd0

Running a diff from the beginning of time to HEAD:

$ rbd diff foo
Offset  Length   Type
0       2097152  data

0~1M extent is expected instead of 0~2M extent, because the size of the object in question is 1M:

$ rbd info foo | grep block_name_prefix
        block_name_prefix: rbd_data.81db3b85b87e
$ rados -p rbd stat rbd_data.81db3b85b87e.0000000000000000
rbd/rbd_data.81db3b85b87e.0000000000000000 mtime 2023-12-08T12:26:57.000000+0100, size 1048576

This appears to be yet another bug in calc_snap_set_diff() which only ever appends to the diff:

calc_snap_set_diff start 0 end 18446744073709551614, snap_set seq 24
 clone 24 snaps [24] -> [24,24] size 2097152 overlap to next [0,1048576]
  start, after 0
  diff_to_next [1048576~1048576]
  diff now [0~2097152]
 clone 18446744073709551614 snaps [] -> [25,18446744073709551614] size 1048576 overlap to next []
 end

Related issues 4 (0 open — 4 closed)

Related to rbd - Bug #53897: diff-iterate can report holes when diffing against the beginning of time (fromsnapname == NULL)ResolvedIlya Dryomov

Actions
Copied to rbd - Backport #64914: squid: [diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequestResolvedIlya Dryomov

Actions
Copied to rbd - Backport #64915: quincy: [diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequestResolvedIlya Dryomov

Actions
Copied to rbd - Backport #64916: reef: [diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequestResolvedIlya Dryomov

Actions

ID Updated by Ilya Dryomov almost 3 years ago Actions #1

  • Related to Bug #53897: diff-iterate can report holes when diffing against the beginning of time (fromsnapname == NULL) added

ID Updated by Ilya Dryomov almost 3 years ago Actions #2

  • Description updated (diff)

ID Updated by Ilya Dryomov almost 3 years ago Actions #3

  • Description updated (diff)

ID Updated by Ilya Dryomov almost 3 years ago Actions #4

Note that fast-diff feature being disabled is relevant only to "rbd diff". Other users of ObjectListSnapsRequest, such as deep-copy, are affected unconditionally.

ID Updated by Ilya Dryomov over 2 years ago Actions #5

  • Status changed from In Progress to Fix Under Review
  • Backport changed from pacific,quincy,reef to quincy,reef,squid
  • Pull request ID set to 56064

ID Updated by Ilya Dryomov over 2 years ago Actions #6

  • Status changed from Fix Under Review to Pending Backport

UB Updated by Upkeep Bot over 2 years ago Actions #7

  • Copied to Backport #64914: squid: [diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequest added

UB Updated by Upkeep Bot over 2 years ago Actions #8

  • Copied to Backport #64915: quincy: [diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequest added

UB Updated by Upkeep Bot over 2 years ago Actions #9

  • Copied to Backport #64916: reef: [diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequest added

ID Updated by Ilya Dryomov over 2 years ago Actions #11

  • Status changed from Pending Backport to Resolved

UB Updated by Upkeep Bot over 1 year ago Actions #12

  • Merge Commit set to 371dd06f152b7fac4d1b1730ed5131af1f8d5686
  • Fixed In set to v19.3.0-526-g371dd06f152
  • Upkeep Timestamp set to 2025-07-11T17:40:38+00:00

UB Updated by Upkeep Bot over 1 year ago Actions #13

  • Fixed In changed from v19.3.0-526-g371dd06f152 to v19.3.0-526-g371dd06f15
  • Upkeep Timestamp changed from 2025-07-11T17:40:38+00:00 to 2025-07-14T23:39:50+00:00

UB Updated by Upkeep Bot about 1 year ago Actions #14

  • Released In set to v20.2.0~3371
  • Upkeep Timestamp changed from 2025-07-14T23:39:50+00:00 to 2025-11-01T01:20:54+00:00
Actions

Also available in: PDF Atom