From patchwork Sat Jan 12 06:04:55 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Marzinski X-Patchwork-Id: 1968761 Return-Path: X-Original-To: patchwork-dm-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by patchwork2.kernel.org (Postfix) with ESMTP id DCAB2DF230 for ; Sat, 12 Jan 2013 06:10:09 +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 r0C67jKe002883; Sat, 12 Jan 2013 01:07:45 -0500 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 r0C65Ofk006320 for ; Sat, 12 Jan 2013 01:05:24 -0500 Received: from ether.msp.redhat.com (ether.msp.redhat.com [10.15.80.119]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0C65NlQ015493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 12 Jan 2013 01:05:24 -0500 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 r0C65MJw003480; Sat, 12 Jan 2013 00:05:22 -0600 Received: (from bmarzins@localhost) by ether.msp.redhat.com (8.14.1/8.14.1/Submit) id r0C65MME003479; Sat, 12 Jan 2013 00:05:22 -0600 From: Benjamin Marzinski To: device-mapper development Date: Sat, 12 Jan 2013 00:04:55 -0600 Message-Id: <1357970695-3396-18-git-send-email-bmarzins@redhat.com> In-Reply-To: <1357970695-3396-1-git-send-email-bmarzins@redhat.com> References: <1357970695-3396-1-git-send-email-bmarzins@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-loop: dm-devel@redhat.com Cc: Christophe Varoqui Subject: [dm-devel] [PATCH V3 18/18] multipath: make path devices readonly again. 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 Path device fds were changed to be opened read/write when the mpathpersist code was added. However, I have talked with Vijay, and this doesn't appear to be necessary for mpathpersist to work correctly. If the path fds are opened read/write, when the are closed a change uevent is triggered, which was causing problems during shutdown with LVM on top of multipath devices. This patch reverts them to being read-only again. Signed-off-by: Benjamin Marzinski --- libmultipath/discovery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 831cfef..8b6f74d 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -886,7 +886,7 @@ pathinfo (struct path *pp, vector hwtable, int mask) * fetch info not available through sysfs */ if (pp->fd < 0) - pp->fd = open(udev_device_get_devnode(pp->udev), O_RDWR); + pp->fd = open(udev_device_get_devnode(pp->udev), O_RDONLY); if (pp->fd < 0) { condlog(4, "Couldn't open node for %s: %s",