Project

General

Profile

Actions

Bug #63770

open

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

Added by Ilya Dryomov 5 months ago. Updated about 2 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

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

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 open4 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 DryomovActions
Copied to rbd - Backport #64915: quincy: [diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequestResolvedIlya DryomovActions
Copied to rbd - Backport #64916: reef: [diff-iterate] discards that truncate aren't accounted for by ObjectListSnapsRequestResolvedIlya DryomovActions
Actions #1

Updated by Ilya Dryomov 5 months ago

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

Updated by Ilya Dryomov 5 months ago

  • Description updated (diff)
Actions #3

Updated by Ilya Dryomov 5 months ago

  • Description updated (diff)
Actions #4

Updated by Ilya Dryomov 2 months ago

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

Actions #5

Updated by Ilya Dryomov about 2 months ago

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

Updated by Ilya Dryomov about 2 months ago

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

Updated by Backport Bot about 2 months ago

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

Updated by Backport Bot about 2 months ago

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

Updated by Backport Bot about 2 months ago

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

Updated by Backport Bot about 2 months ago

  • Tags set to backport_processed
Actions

Also available in: Atom PDF