From patchwork Mon Mar 16 12:36:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 6018121 X-Patchwork-Delegate: christophe.varoqui@free.fr Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 56D6B9F820 for ; Mon, 16 Mar 2015 12:44:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8135D204E4 for ; Mon, 16 Mar 2015 12:44:18 +0000 (UTC) Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDB2E204D9 for ; Mon, 16 Mar 2015 12:44:16 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id t2GCcQj9021161; Mon, 16 Mar 2015 08:38:26 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id t2GCbJ3I028903 for ; Mon, 16 Mar 2015 08:37:19 -0400 Received: from mx1.redhat.com (ext-mx02.extmail.prod.ext.phx2.redhat.com [10.5.110.26]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2GCbJfT020320 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 16 Mar 2015 08:37:19 -0400 Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by mx1.redhat.com (Postfix) with ESMTPS id 8C9D0C3291; Mon, 16 Mar 2015 12:37:18 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 9F71EAD56; Mon, 16 Mar 2015 12:37:10 +0000 (UTC) From: Hannes Reinecke To: Christophe Varoqui Date: Mon, 16 Mar 2015 13:36:45 +0100 Message-Id: <1426509425-15978-59-git-send-email-hare@suse.de> In-Reply-To: <1426509425-15978-1-git-send-email-hare@suse.de> References: <1426509425-15978-1-git-send-email-hare@suse.de> X-RedHat-Spam-Score: -7.309 (BAYES_00, DCC_REPUT_00_12, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, URIBL_BLOCKED) 195.135.220.15 cantor2.suse.de 195.135.220.15 cantor2.suse.de X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Scanned-By: MIMEDefang 2.75 on 10.5.110.26 X-loop: dm-devel@redhat.com Cc: dm-devel@redhat.com Subject: [dm-devel] [PATCH 58/78] Remove dm_udev_XXX wrapper functions 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-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As the definitions are encapsulated with the correct definitions anyway there is no need to have private wrappers here. Signed-off-by: Hannes Reinecke --- libmultipath/devmapper.c | 19 +++++-------------- libmultipath/devmapper.h | 2 -- multipath/main.c | 2 +- multipathd/main.c | 2 +- 4 files changed, 7 insertions(+), 18 deletions(-) diff --git a/libmultipath/devmapper.c b/libmultipath/devmapper.c index f0b0da1..1712c56 100644 --- a/libmultipath/devmapper.c +++ b/libmultipath/devmapper.c @@ -42,23 +42,14 @@ static inline int dm_task_set_cookie(struct dm_task *dmt, uint32_t *c, int a) return 1; } -void udev_wait(unsigned int c) +void dm_udev_wait(unsigned int c) { } -void udev_set_sync_support(int c) +void dm_udev_set_sync_support(int c) { } -#else -void udev_wait(unsigned int c) -{ - dm_udev_wait(c); -} -void udev_set_sync_support(int c) -{ - dm_udev_set_sync_support(c); -} #endif static void @@ -245,7 +236,7 @@ dm_simplecmd (int task, const char *name, int no_flush, int need_sync, uint16_t if (!r) dm_udev_complete(cookie); else - udev_wait(cookie); + dm_udev_wait(cookie); } out: dm_task_destroy (dmt); @@ -325,7 +316,7 @@ dm_addmap (int task, const char *target, struct multipath *mpp, char * params, if (!r) dm_udev_complete(cookie); else - udev_wait(cookie); + dm_udev_wait(cookie); } freeout: if (prefixed_uuid) @@ -1354,7 +1345,7 @@ dm_rename (char * old, char * new) if (!r) dm_udev_complete(cookie); else - udev_wait(cookie); + dm_udev_wait(cookie); out: dm_task_destroy(dmt); diff --git a/libmultipath/devmapper.h b/libmultipath/devmapper.h index 8188f48..2613503 100644 --- a/libmultipath/devmapper.h +++ b/libmultipath/devmapper.h @@ -49,8 +49,6 @@ int dm_rename (char * old, char * new); int dm_reassign(const char * mapname); int dm_reassign_table(const char *name, char *old, char *new); int dm_setgeometry(struct multipath *mpp); -void udev_wait(unsigned int c); -void udev_set_sync_support(int c); #define VERSION_GE(v, minv) ( \ (v[0] > minv[0]) || \ diff --git a/multipath/main.c b/multipath/main.c index bee9a65..f62dcb1 100644 --- a/multipath/main.c +++ b/multipath/main.c @@ -582,7 +582,7 @@ main (int argc, char *argv[]) if (dm_prereq()) exit(1); dm_drv_version(conf->version, TGT_MPATH); - udev_set_sync_support(1); + dm_udev_set_sync_support(1); if (optind < argc) { conf->dev = MALLOC(FILE_NAME_SIZE); diff --git a/multipathd/main.c b/multipathd/main.c index b86e3b6..fd3514f 100644 --- a/multipathd/main.c +++ b/multipathd/main.c @@ -1817,7 +1817,7 @@ child (void * param) set_oom_adj(); conf->daemon = 1; - udev_set_sync_support(0); + dm_udev_set_sync_support(0); #ifdef USE_SYSTEMD envp = getenv("WATCHDOG_USEC"); if (envp && sscanf(envp, "%lu", &checkint) == 1) {