From patchwork Mon Sep 28 17:19:00 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 50425 X-Patchwork-Delegate: christophe.varoqui@free.fr Received: from hormel.redhat.com (hormel1.redhat.com [209.132.177.33]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8SHRHJk015859 for ; Mon, 28 Sep 2009 17:27:17 GMT Received: from listman.util.phx.redhat.com (listman.util.phx.redhat.com [10.8.4.110]) by hormel.redhat.com (Postfix) with ESMTP id 8A18C619417; Mon, 28 Sep 2009 13:27:16 -0400 (EDT) Received: from int-mx05.intmail.prod.int.phx2.redhat.com (nat-pool.util.phx.redhat.com [10.8.5.200]) by listman.util.phx.redhat.com (8.13.1/8.13.1) with ESMTP id n8SHREqG028362 for ; Mon, 28 Sep 2009 13:27:14 -0400 Received: from ether.msp.redhat.com (ether.msp.redhat.com [10.15.80.119]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n8SHRDAV012854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 28 Sep 2009 13:27:14 -0400 Received: from ether.msp.redhat.com (localhost.localdomain [127.0.0.1]) by ether.msp.redhat.com (8.14.1/8.14.1) with ESMTP id n8SHJ0rn011376 for ; Mon, 28 Sep 2009 12:19:01 -0500 Received: (from bmarzins@localhost) by ether.msp.redhat.com (8.14.1/8.14.1/Submit) id n8SHJ0ul011375 for dm-devel@redhat.com; Mon, 28 Sep 2009 12:19:00 -0500 Date: Mon, 28 Sep 2009 12:19:00 -0500 From: Benjamin Marzinski To: device-mapper development Message-ID: <20090928171900.GC20896@ether.msp.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17 (2007-11-01) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 X-loop: dm-devel@redhat.com Subject: [dm-devel] [PATCH] multipath-tools: Fix dry-run output X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.5 Precedence: junk Reply-To: device-mapper development List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com When multipath checks whether or not the multipath device needs to be renamed, it only does the check if dry-run isn't selected. This means that you will instead see all your renames as creates during a dry-run. The attached patch fixes this. Signed-off-by: Benjamin Marzinski --- libmultipath/configure.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel Index: multipath-tools-090902/libmultipath/configure.c =================================================================== --- multipath-tools-090902.orig/libmultipath/configure.c +++ multipath-tools-090902/libmultipath/configure.c @@ -151,7 +151,7 @@ select_action (struct multipath * mpp, v if (!cmpp) { cmpp = find_mp_by_wwid(curmp, mpp->wwid); - if (cmpp && !conf->dry_run) { + if (cmpp) { condlog(2, "%s: rename %s to %s", mpp->wwid, cmpp->alias, mpp->alias); strncpy(mpp->alias_old, cmpp->alias, WWID_SIZE);