Bug 1415232

Summary: thin-pool target seem not doing commits without any i/o
Product: [Community] LVM and device-mapper Reporter: Zdenek Kabelac <zkabelac>
Component: lvm2Assignee: Joe Thornber <thornber>
lvm2 sub component: Thin Provisioning QA Contact: cluster-qe <cluster-qe>
Status: ASSIGNED --- Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, thornber, zkabelac
Version: 2.02.169Flags: rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1450419 (view as bug list) Environment:
Last Closed: 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: 1450419    

Description Zdenek Kabelac 2017-01-20 16:05:06 UTC
Description of problem:

Reporting of status with noflush  (dmsetup status --noflush) seems to never get the 'correct' status even after long waiting and no i/o to thin-pool.
Flushing status is needed to enforce commit.

Example of issue  (having VG 'vg')

lvcreate -T -L10 vg/pool  -V9 -n testLV

dd if=/dev/zero  of=/dev/vg/testLV  bs=1M count=9

lvs -a   
   shows  90% of data thin-pool usage      -> exact
     and 100% of data thin volume usage    -> exact

let's discard thin device:

blkdiscard  /dev/vg/testLV

lvs -a   
   shows  90% of data thin-pool usage      -> this is not exact
     and   0% of data thin volume usage    -> this is OK

lvm2 dropped usage of 'flushing' when obtaining status and there is opened bug 1358314 to rather add support for some 'explicit' flushing logic later.

But there was assumption that in some short period of time
we will obtain valid data anyway - but even after minutes
'dmsetup status --noflush /  lvs -a' is still showing 144/160 usage.
after
'dmsetup status'  data are instantly corrected to 0/160.


Version-Release number of selected component (if applicable):
4.10.0-0.rc2.git2.1.fc26.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Joe Thornber 2017-04-20 14:35:21 UTC
I've added this test to the test suite.  It passes with my upstream kernel.  Checking with RHEL next.

https://github.com/jthornber/device-mapper-test-suite/commit/272b0e5b78e15f773ea7bccaea293c8a47e685

Comment 2 Joe Thornber 2017-04-20 16:06:58 UTC
It fails with RHEL

Comment 3 Zdenek Kabelac 2017-06-25 09:15:43 UTC
Still reproducible/observed with:

4.12.0-0.rc6.git3.2.fc27.x86_64

Comment 4 Zdenek Kabelac 2020-09-29 15:23:49 UTC
This issue is reproducible on current upstream kernel:  5.9.0-0.rc6.13.fc34.x86_64