RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 858113 - --discards doesn't work with lvcreate and the default is ignore not passdown.
Summary: --discards doesn't work with lvcreate and the default is ignore not passdown.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-18 02:24 UTC by Xiaowei Li
Modified: 2021-09-08 20:31 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-07 07:01:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Xiaowei Li 2012-09-18 02:24:20 UTC
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 09:49:42 UTC
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-14 03:53:54 UTC
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.