Project

General

Profile

Bug #24545

yet another case when deep copying a clone may result in invalid object map

Added by Mykola Golub about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
06/16/2018
Due date:
% Done:

0%

Source:
Tags:
Backport:
mimic
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

The case:

clone
discard an object at offset X
create snap1
shrink to the size less then X
create snap2
deep copy

When deep copying the object X, it tries to update the destination object map for snap2 (to hide the parent), which fails with ERANGE.

2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 ObjectCopyRequest: dst_oid=rbd_data.4d424cbdf1e.0000000000000001
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_src_object_extents: 1 src extents
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_list_snaps: src_oid=rbd_data.4d41d51a0e4.0000000000000001
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 handle_list_snaps: r=0
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_read_ops: start_src_snap_id=0, end_src_snap_id=4, clone_end_snap_id=4, end_dst_snap_id=6, diff=[0~4194304], end_size=4194304, exists=1
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_read_ops: src_object_extent: 0~4194304, dst_object_offset=0, read: [0~4194304]
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_read_ops: read/write op: 0~4194304 dst: 0
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_read_ops: start_src_snap_id=4, end_src_snap_id=5, clone_end_snap_id=0, end_dst_snap_id=7, diff=[0~4194304], end_size=0, exists=0
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_read_ops: clearing truncate diff: [0~4194304]
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_read_ops: extent 0~4194304 intersects truncation 0~4194304, inserting zero 0~4194304
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_read_ops: src_object_extent: 0~4194304, dst_object_offset=0, read: []
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_read_ops: start_src_snap_id=5, end_src_snap_id=18446744073709551614, clone_end_snap_id=0, end_dst_snap_id=18446744073709551614, diff=[], end_size=0, exists=0
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_read_object: src_snap_seq=4
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_read_object: read op: 0~4194304
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_read_object: read rbd_data.4d41d51a0e4.0000000000000001
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 handle_read_object: r=0
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 merge_write_ops: 
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_read_from_parent_ops: no extents need read from parent
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 handle_read_from_parent: r=0
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_zero_ops: 
2018-06-16 13:15:49.760 7f6735ffb700 10 librbd::ImageCtx: prune_parent_extents image overlap 83886080, object overlap 4194304 from image extents [4194304,4194304]
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_zero_ops: src_snap_seq=4, end_size=4194304
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_zero_ops: COPY_OP_TYPE_REMOVE_TRUNC
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_zero_ops: src_snap_seq=5, end_size=0
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 compute_zero_ops: src_snap_seq=18446744073709551614, end_size=0
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_write_object: dst_snap_seq=0, dst_snaps=[]
2018-06-16 13:15:49.760 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_write_object: write op: 0~4194304
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 handle_write_object: r=0
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_write_object: dst_snap_seq=6, dst_snaps=[6]
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_write_object: create op
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_write_object: trunc op: 0
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 handle_write_object: r=0
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_write_object: dst_snap_seq=7, dst_snaps=[7,6]
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 handle_write_object: r=0
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_update_object_map: dst_snap_id=6, object_state=1
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::ManagedLock: 0x7f67100a1e60 is_lock_owner: =1
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::ObjectMap: 0x7f671005b140 aio_update: start=1, end=2, ->1
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::object_map::UpdateRequest: 0x7f671006a4b0 update_object_map: ictx=0x559e4a34c180, oid=rbd_object_map.4d424cbdf1e.0000000000000006, [1,2) = ->1
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::object_map::UpdateRequest: 0x7f671006a4b0 handle_update_object_map: r=0
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::object_map::Request: 0x7f671006a4b0 should_complete: r=0
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 handle_update_object_map: r=0
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::deep_copy::ObjectCopyRequest: 0x7f67100b4710 send_update_object_map: dst_snap_id=7, object_state=1
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::ManagedLock: 0x7f67100a1e60 is_lock_owner: =1
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::ObjectMap: 0x7f671005b140 aio_update: start=1, end=2, ->1
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::object_map::UpdateRequest: 0x7f671005d880 update_object_map: ictx=0x559e4a34c180, oid=rbd_object_map.4d424cbdf1e.0000000000000007, [1,2) = ->1
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::object_map::UpdateRequest: 0x7f671005d880 handle_update_object_map: r=-34
2018-06-16 13:15:49.764 7f6735ffb700 20 librbd::object_map::Request: 0x7f671005d880 should_complete: r=-34
2018-06-16 13:15:49.764 7f6735ffb700 -1 librbd::object_map::Request: failed to update object map: (34) Numerical result out of range
2018-06-16 13:15:49.764 7f6735ffb700 -1 librbd::object_map::InvalidateRequest: 0x7f671005dda0 invalidating object map in-memory
2018-06-16 13:15:49.764 7f6735ffb700 -1 librbd::object_map::InvalidateRequest: 0x7f671005dda0 invalidating object map on-disk

Related issues

Copied to rbd - Backport #24596: mimic: yet another case when deep copying a clone may result in invalid object map Resolved

History

#1 Updated by Mykola Golub about 1 year ago

  • Status changed from In Progress to Need Review
  • Backport set to mimic

#2 Updated by Jason Dillaman about 1 year ago

  • Status changed from Need Review to Pending Backport

#3 Updated by Nathan Cutler about 1 year ago

  • Copied to Backport #24596: mimic: yet another case when deep copying a clone may result in invalid object map added

#4 Updated by Nathan Cutler about 1 year ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF