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 1130168 - DM_DEFERRED_REMOVE support is missing from dmsetup
Summary: DM_DEFERRED_REMOVE support is missing from dmsetup
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: lvm2
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: pre-dev-freeze
: ---
Assignee: Mikuláš Patočka
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 1109431
Blocks: 1107315
TreeView+ depends on / blocked
 
Reported: 2014-08-14 13:16 UTC by Alasdair Kergon
Modified: 2014-10-14 08:25 UTC (History)
16 users (show)

Fixed In Version: lvm2-2.02.110-1.el6
Doc Type: Enhancement
Doc Text:
dmsetup remove gains a new flag --deferred. If this flag is specified and the device is open, it is scheduled to be deleted later, when it is gets closed.
Clone Of: 1109431
Environment:
Last Closed: 2014-10-14 08:25:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The patch to fix this bug (7.29 KB, patch)
2014-08-14 16:16 UTC, Mikuláš Patočka
no flags Details | Diff
The updated patch (12.09 KB, patch)
2014-08-15 17:44 UTC, Mikuláš Patočka
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1387 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2014-10-14 01:39:47 UTC

Description Alasdair Kergon 2014-08-14 13:16:37 UTC
+++ This bug was initially created as a clone of Bug #1109431 +++

dmsetup needs to support the DM_DEFERRED_REMOVE kernel option to facilitate testing.

The missing patch is here: http://people.redhat.com/mpatocka/patches/kernel/deferred-remove/userspace-deferred-remove.patch

--- Additional comment from xhe on 2014-08-14 04:53:34 BST ---

I suppose to reproduce this bug like what you supplied in #1. But I found dmsetup doesn't have this argument --deferred.

--- Additional comment from Alasdair Kergon on 2014-08-14 14:08:05 BST ---

Yes, that completely slipped through the net!

It'll have to go through on an lvm2 bugzilla, not a kernel one.

Comment 1 Mikuláš Patočka 2014-08-14 16:16:02 UTC
Created attachment 926857 [details]
The patch to fix this bug

Comment 2 Alasdair Kergon 2014-08-15 02:02:46 UTC
(patch needs a small modification to deal with an ABI break we can easily avoid)

Comment 3 Mikuláš Patočka 2014-08-15 17:44:13 UTC
Created attachment 927190 [details]
The updated patch

A new patch that maintains ABI compatibility.

Comment 12 Corey Marthaler 2014-09-04 23:00:06 UTC
Fix verified using the test case given in bug 1109431.

OLD KERNEL:

2.6.32-495.el6.x86_64
lvm2-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
lvm2-libs-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
lvm2-cluster-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
udev-147-2.57.el6    BUILT: Thu Jul 24 08:48:47 CDT 2014
device-mapper-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-libs-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-event-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-event-libs-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014

[root@host-025 ~]# lvcreate --type mirror --alloc anywhere -L 1G -n mirror vg1
  Logical volume "mirror" created
[root@host-025 ~]# mkfs.ext3 /dev/vg1/mirror
mke2fs 1.41.12 (17-May-2010)
[...]
[root@host-025 ~]# mount /dev/vg1/mirror /mnt/mirror/
[root@host-025 ~]# dmsetup remove /dev/vg1/mirror --deferred
[root@host-025 ~]# umount /dev/vg1/mirror 
[HANG]

EXT3-fs (dm-5): mounted filesystem with ordered data mode
------------[ cut here ]------------
WARNING: at kernel/workqueue.c:366 flush_cpu_workqueue+0x8d/0x90() (Not tainted)
Hardware name: KVM
Modules linked in: ext3 jbd dm_raid raid10 raid1 raid456 async_raid6_recov async_pq raid6_pq async_xor xor async_memcpy async_tx dm_snapshot dm_bufio iptable_filter ip_tables autofs4 sg sd_mod crc_t10dif be2iscsi iscsi_boot_sysfs bnx2i cnic uio cxgb4i cxgb4 cxgb3i libcxgbi cxgb3 mdio ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi microcode virtio_balloon virtio_net i2c_piix4 i2c_core ext4 jbd2 mbcache virtio_blk virtio_pci virtio_ring virtio pata_acpi ata_generic ata_piix dm_mirror dm_region_hash dm_log dm_mod [last unloaded: speedstep_lib]
Pid: 7, comm: events/0 Not tainted 2.6.32-495.el6.x86_64 #1
Call Trace:
 [<ffffffff81074df7>] ? warn_slowpath_common+0x87/0xc0
 [<ffffffff81074e4a>] ? warn_slowpath_null+0x1a/0x20
 [<ffffffff810983dd>] ? flush_cpu_workqueue+0x8d/0x90
 [<ffffffff8109837a>] ? flush_cpu_workqueue+0x2a/0x90
 [<ffffffff81087fdb>] ? try_to_del_timer_sync+0x7b/0xe0
 [<ffffffff81098e84>] ? flush_workqueue+0x54/0x80
 [<ffffffff81098ec5>] ? flush_scheduled_work+0x15/0x20




NEW KERNEL:

2.6.32-500.el6.x86_64
lvm2-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
lvm2-libs-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
lvm2-cluster-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
udev-147-2.57.el6    BUILT: Thu Jul 24 08:48:47 CDT 2014
device-mapper-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-libs-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-event-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-event-libs-1.02.90-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014
device-mapper-persistent-data-0.3.2-1.el6    BUILT: Fri Apr  4 08:43:06 CDT 2014
cmirror-2.02.111-2.el6    BUILT: Mon Sep  1 06:46:43 CDT 2014


[root@host-025 ~]# lvcreate --type mirror --alloc anywhere -L 1G -n mirror vg1
  Logical volume "mirror" created
[root@host-025 ~]# mkfs.ext3 /dev/vg1/mirror
mke2fs 1.41.12 (17-May-2010)
[root@host-025 ~]# mount /dev/vg1/mirror /mnt/mirror/
[root@host-025 ~]# dmsetup remove /dev/vg1/mirror* --deferred
[root@host-025 ~]# umount /dev/vg1/mirror 
[root@host-025 ~]# df -h | grep mirror
[root@host-025 ~]# 

Sep  4 17:56:06 host-025 kernel: device-mapper: ioctl: remove_all left 5 open device(s)

Comment 13 errata-xmlrpc 2014-10-14 08:25:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1387.html


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