Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 918647 - dm-thin: Discarding blocks shared between thin devices may cause data loss
dm-thin: Discarding blocks shared between thin devices may cause data loss
Status: CLOSED DUPLICATE of bug 922931
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.4
All All
urgent Severity urgent
: pre-dev-freeze
: 6.5
Assigned To: Mike Snitzer
yanfu,wang
:
Depends On:
Blocks: 919138
  Show dependency treegraph
 
Reported: 2013-03-06 11:31 EST by Jim Minter
Modified: 2013-09-19 15:42 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
Thin provisioning uses reference counts to indicate that data is shared between a thin volume and snapshots of the thin volume. There is a known issue with the way reference counts are managed in the case when a discard is issued to a thin volume that has snapshots. Creating snapshots of a thin volume and then issuing discards to the thin volume can therefore result in data loss in the snapshot volumes. Users are strongly encouraged to disable discard support on the thin-pool for the time being. To do so using lvm2 while the pool is offline, use the lvchange --discard ignore <pool> command. Any discards that might be issued to thin volumes will be ignored.
Story Points: ---
Clone Of:
: 919138 (view as bug list)
Environment:
Last Closed: 2013-09-19 15:42:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jim Minter 2013-03-06 11:31:56 EST
Bug originally reported at http://www.redhat.com/archives/dm-devel/2013-March/msg00033.html , problem relates to issuing the BLKDISCARD ioctl to a thin volume.  If I create a thin volume, fill it with data, snapshot it, then call BLKDISCARD on the thin volume, it looks like the kernel doesn't take into account the fact that the underlying blocks are shared with the snapshot, and just goes ahead and discards them.  This appears to then leave the metadata in an inconsistent state.

Fix at https://github.com/jthornber/linux-2.6/commit/a42dfef751cb666d3274346c07dff655cb40cc5a ("Fix a bug in dm_btree_remove that could leave leaf values with incorrect reference counts").
Comment 1 Zdenek Kabelac 2013-03-07 03:13:48 EST
Are we going add 'workaround' support for this issue in lvm2 tools - to disable usage of discard for thinp targets prior some specific version ?

If so - how do we detect target with this bug - will there be version number increase?

Note You need to log in before you can comment on or make changes to this bug.