Hide Forgot
+++ 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.
Created attachment 926857 [details] The patch to fix this bug
(patch needs a small modification to deal with an ABI break we can easily avoid)
Created attachment 927190 [details] The updated patch A new patch that maintains ABI compatibility.
https://lists.fedorahosted.org/pipermail/lvm2-commits/2014-August/002639.html https://lists.fedorahosted.org/pipermail/lvm2-commits/2014-August/002657.html
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)
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