Bug 1337588 - When *cache* target reports 'clean' state, it then may report dirty blocks on table reload
Summary: When *cache* target reports 'clean' state, it then may report dirty blocks on...
Keywords:
Status: NEW
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: device-mapper
Version: 2.02.152
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Joe Thornber
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-19 14:26 UTC by Zdenek Kabelac
Modified: 2023-08-10 15:40 UTC (History)
6 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 2016-05-19 14:26:25 UTC
Description of problem:

While introducing lvm2 support for live change of cache mode I've noticed,
waiting for  'clean' cache even with 'flushing' status still does not
ensure the clean data appears on this.
Table reload from 'cleaner' policy to to use 'passthrough' cache mode is aborted because cache reports dirty blocks:
--
cache metadata: cache block 273 is dirty
table: 253:2: cache: Cannot enter passthrough mode unless all blocks are clean
ioctl: error adding target to table
--

Putting there longer waits or even calling 'sync'  does not fixes it.

Version-Release number of selected component (if applicable):
kernel 4.6
cache v1.9.0

How reproducible:

Steps to Reproduce:
1. create dirty cached device in writaback mode
2. reload with cleaner policy
3. wait for clean cache (status with fluch)
4. try to reload table with passthrough cache mode

Actual results:
Getting errors with dirty block prevent this change

Expected results:
No dirty block reported - operation should pass

Additional info:
As a workaound extra call:
  suspend
  resume 
after 'clean' cache status being reported fixes the problem and allows to proceed. (Lvm2 will add this 'extra' call to ensure backward compatibility,
once kernel is fixes, this extra suspend/resume might be skipped)


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