Bug 858113 - --discards doesn't work with lvcreate and the default is ignore not passdown.
--discards doesn't work with lvcreate and the default is ignore not passdown.
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Zdenek Kabelac
Cluster QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-17 22:24 EDT by Xiaowei Li
Modified: 2015-01-26 19:10 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-07 02:01:01 EST
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 Xiaowei Li 2012-09-17 22:24:20 EDT
Description of problem:
--discards doesn't work with lvcreate and the default is ignore not passdown.

Version-Release number of selected component (if applicable):
lvm2-2.02.97-1.el7.x86_64

How reproducible:


Steps to Reproduce:
1. man lvcreate
===
       --discards {ignore|nopassdown|passdown}
              Set discards behavior.  Default is passdown.
===

2. create thin pool with --discards
# lvcreate -L16m -T tsvg/pool1 
# lvcreate -L16m -T tsvg/pool2 --discards nopassdown

3. # lvs -ovg_name,lv_name,discards tsvg
  VG   LV    Discards
  tsvg pool1   ignore
  tsvg pool2   ignore
  
# dmsetup table --target thin-pool
tsvg-pool1-tpool: 0 32768 thin-pool 253:1 253:2 128 0 1 ignore_discard 
tsvg-pool2-tpool: 0 32768 thin-pool 253:5 253:6 128 0 1 ignore_discard 

from the debug log:
===
#lvmcmdline.c:1087         Processing: lvcreate -L16m -T tsvg/pool3 --discards nopassdown -vvvv
>>>snip>>>
#libdm-deptree.c:2324         Adding target to (253:12): 0 32768 thin-pool 253:10 253:11 128 0 1 ignore_discard
===

Actual results:


Expected results:


Additional info:
Comment 1 Zdenek Kabelac 2012-09-19 05:49:42 EDT
Already fixed in upstream:

https://www.redhat.com/archives/lvm-devel/2012-August/msg00062.html

(Before the release of lvm2-2.02.97, there were some changes that've missed to update some related code parts)
Comment 2 Xiaowei Li 2012-11-13 22:53:54 EST
verified with lvm2-2.02.98-2.el7.x86_64

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