Bug 1848594

Summary: "rbd import-diff" will potentially ignore discarded regions
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Jason Dillaman <jdillama>
Component: RBDAssignee: Jason Dillaman <jdillama>
Status: CLOSED ERRATA QA Contact: Gopi <gpatta>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0CC: ceph-eng-bugs, gpatta, tserlin, vereddy
Target Milestone: z2   
Target Release: 4.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-14.2.8-96.el8cp, ceph-14.2.8-96.el7cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1848598 (view as bug list) Environment:
Last Closed: 2020-09-30 17:25:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1848598    

Description Jason Dillaman 2020-06-18 15:06:20 UTC
Description of problem:
Create an "rbd export-diff" of a snapshot that includes newly discarded regions. When running "rbd import-diff", it will issue discards via the librbd API, but the librbd API will incorrectly prune the extents of the discard to align against 64KiB boundaries (by default). This might result in an unexpected difference between the two images even though a discard should not be assumed to actually free disk space and zero it. 

Version-Release number of selected component (if applicable):
4.0 + 5.0

How reproducible:
100%

Steps to Reproduce:
1. Export an image snapshot diff that includes unaligned (64KiB) discards using a pre-RHCS 4 client.
2. Attempt to import the snapshot diff using an RHCS 4+ client that now ignores unaligned discards

Actual results:
The unaligned discarded region will be be discarded in the import-diff destination image.

Expected results:
The unaligned discarded regions should be zeroed since users might be attempting to verify proper import/export via checksums -- which will fail if the images don't exactly match.

Additional info:

Comment 7 Gopi 2020-09-22 02:39:52 UTC
Working as expected, hence marking this bug as verified.

Comment 9 errata-xmlrpc 2020-09-30 17:25:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 4.1 Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4144