From patchwork Mon Aug 9 16:16:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: bmarzins@sourceware.org X-Patchwork-Id: 118418 Received: from mx01.colomx.prod.int.phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o79GIwnq028082 for ; Mon, 9 Aug 2010 16:19:34 GMT Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx01.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o79GGSZb016252; Mon, 9 Aug 2010 12:16:29 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o79GGQHk022711 for ; Mon, 9 Aug 2010 12:16:26 -0400 Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.8]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o79GGLTH024861 for ; Mon, 9 Aug 2010 12:16:21 -0400 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by mx1.redhat.com (8.13.8/8.13.8) with SMTP id o79GGBbx028254 for ; Mon, 9 Aug 2010 12:16:11 -0400 Received: (qmail 8645 invoked by uid 9475); 9 Aug 2010 16:16:10 -0000 Date: 9 Aug 2010 16:16:10 -0000 Message-ID: <20100809161610.8643.qmail@sourceware.org> From: bmarzins@sourceware.org To: dm-cvs@sourceware.org, dm-devel@redhat.com X-RedHat-Spam-Score: -2.31 (RCVD_IN_DNSWL_MED,T_RP_MATCHES_RCVD) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.8 X-loop: dm-devel@redhat.com Subject: [dm-devel] multipath-tools/multipathd main.c X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Mon, 09 Aug 2010 16:19:34 +0000 (UTC) --- multipath-tools/multipathd/main.c 2010/06/23 16:28:08 1.69.2.27 +++ multipath-tools/multipathd/main.c 2010/08/09 16:16:10 1.69.2.28 @@ -299,8 +299,18 @@ static int uev_remove_map (char * devname, struct vectors * vecs) { + struct multipath * mpp; + condlog(2, "%s: remove map (uevent)", devname); - return ev_remove_map(devname, vecs); + + mpp = find_mp_by_str(vecs->mpvec, devname); + if (!mpp) { + condlog(2, "%s: devmap not registered, can't remove", devname); + return 0; + } + orphan_paths(vecs->pathvec, mpp); + remove_map(mpp, vecs, stop_waiter_thread, 1); + return 0; } int