Bug 1379472

Summary: Cache target is not always able to transition to error state
Product: [Community] LVM and device-mapper Reporter: Zdenek Kabelac <zkabelac>
Component: device-mapperAssignee: LVM Team <lvm-team>
Status: ASSIGNED --- QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.02.165CC: agk, heinzm, jbrassow, prajnoha, zkabelac
Target Milestone: ---Flags: rule-engine: lvm-technical-solution?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 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: 1377850    

Description Zdenek Kabelac 2016-09-26 21:30:37 UTC
Description of problem:

When 'running' cache over scsi device which is 'offlined' it may not always properly transition to Error/Fail state.

To trigger this state:

Create a cached device (i.e. via lvm2:)

modprobe scsi_debug dev_size_mb=100
vgcreate vg /dev/sdXXX
lvcreate -L10 vg
lvcreate -H -L10 vg/lvol0

Offline scsi:

echo offline >/sys/block/sdXXX/device/state

dmsetup status --noflush
vg-lvol0: 0 24576 cache 8 7/2048 128 0/192 0 30 0 0 0 0 0 1 writethrough 2 migration_threshold 2048 smq 0 rw - 

Try to read 1 byte:

dd if=/dev/vg/lvol0  of=/dev/null bs=1 count=1

kernel loops on: rejecting I/O to offline device

If the 'dmsetup status' is with flush -  cache targets switches to Fail state.


Version-Release number of selected component (if applicable):
4.7 kern

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info: