Bug 1848598

Summary: "rbd import-diff" will potentially ignore discarded regions
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Jason Dillaman <jdillama>
Component: RBDAssignee: Greg Farnum <gfarnum>
Status: CLOSED ERRATA QA Contact: Gopi <gpatta>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.0CC: ceph-eng-bugs, gpatta, hmunjulu, kdreyer, mkasturi, vereddy
Target Milestone: ---   
Target Release: 5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-16.0.0-8633.el8cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1848594 Environment:
Last Closed: 2021-08-30 08:25:38 UTC Type: ---
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: 1848594    
Bug Blocks:    

Description Jason Dillaman 2020-06-18 15:15:30 UTC
+++ This bug was initially created as a clone of Bug #1848594 +++

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 4 errata-xmlrpc 2021-08-30 08:25:38 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 5.0 bug fix and enhancement), 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-2021:3294