Bug 1415259 - thin-pool target seems to be generating spurious events about reaching low water mark
Summary: thin-pool target seems to be generating spurious events about reaching low wa...
Keywords:
Status: ASSIGNED
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: device-mapper
Version: 2.02.169
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-20 16:50 UTC by Zdenek Kabelac
Modified: 2023-08-10 15:40 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:
rule-engine: lvm-technical-solution?


Attachments (Terms of Use)

Description Zdenek Kabelac 2017-01-20 16:50:25 UTC
Description of problem:

It could be observed kernel generates 'extra' DM events about reaching
low water mark for a data device when this actually never happened.

The simple scenario how to reach it -

keep 'lvm.conf  thin_pool_autoextend_threshold = 100
(so there is no interaction with dmeventd & autoresize)


lvcreate -L10 vg/pool -V9 -n thinLV1
lvcreate -V1 -n thinLV2

dd if=/dev/zero of=/dev/vg/thinLV1  bs=1M count=9
dd if=/dev/zero of=/dev/vg/thinLV2  bs=512 count=1

lvs -a show something like this:

 lvs -a
  LV              VG Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  [lvol0_pmspare] vg ewi-------  2,00m
  pool            vg twi-aotz-- 10,00m             90,62  2,15
  [pool_tdata]    vg Twi-ao---- 10,00m
  [pool_tmeta]    vg ewi-ao----  2,00m
  thinLV1         vg Vwi-a-tz--  9,00m pool        100,00
  thinLV2         vg Vwi-a-tz--  1,00m pool        6,25

'dmesg -c' should have no evidence of watermark event.
dmsetup table should be showing this thin-pool table line:
vg-pool-tpool: 0 20480 thin-pool 253:0 253:1 128 0 0 
and status line:
vg-pool-tpool: 0 20480 thin-pool 2 11/512 145/160 - rw discard_passdown queue_if_no_space - 


now:

blkdiscard  /dev/vg/thinLV1

and refill device again:

dd if=/dev/zero of=/dev/vg/thinLV1  bs=1M count=9
dd if=/dev/zero of=/dev/vg/thinLV2  bs=512 count=1    

now one may observe in dmesg  (not always but frequently):

'device-mapper: thin: 253:2: reached low water mark for data device: sending event'

but thin-pool stats are:
vg-pool-tpool: 0 20480 thin-pool 2 11/512 145/160 - rw discard_passdown queue_if_no_space - 

So there should be no reason to 'report' any fullness.
(and in this case watermark is 0 - so only 100% full pool should be generating event)

Impact of this BZ is possibly 'low' - but may consume some extra CPU/RAM resources on processing of unneeded event.


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

How reproducible:
Not always - but usually after creation on new thin-pool and following above steps - very high chance to hit.

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jonathan Earl Brassow 2019-08-06 01:42:18 UTC
still an issue?  is it a kernel issue?


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