WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] tools/hotplug: Linux udev rules adjustmen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools/hotplug: Linux udev rules adjustment
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 09 Oct 2010 14:55:45 -0700
Delivery-date: Sat, 09 Oct 2010 15:02:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1285081141 -3600
# Node ID 588339604ec7e0b5274a2a4033629ccd5e0df2b3
# Parent  c41252a55a0a0da08bfca98e65a7075f1af27ed0
tools/hotplug: Linux udev rules adjustment

While earlier this year some work was done to eliminate libxc's
creation of nodes under /dev (as in some cases it actually got
things wrong), I just found that tapdisk2 does exactly the same.
While I'm not currently aiming at removing this code, I want to
at least suggest some adjustments to the provided rules file.

First of all, the present rule

KERNEL=="blktap[0-9]*", NAME="xen/%k"

matches both blktap1's devices and blktap2's ring devices,
resulting in whoever comes last replacing what was there
before (e.g. a tap2:aio: attach will replace bltap1's
/dev/blktap0 [i.e. the main control device] with the ring device
of the new virtual disk). Therefore we should add a subsystem
qualifier there.

Second, at some udev versions default to using 0660 as the
permissions on nodes it creates. The kernel (with devtmpfs)
defaults to 0600, and hence I'd suggest to also make this
explicit in the rules.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Cc: Boris Derzhavets <bderzhavets@xxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/hotplug/Linux/xen-backend.rules |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -r c41252a55a0a -r 588339604ec7 tools/hotplug/Linux/xen-backend.rules
--- a/tools/hotplug/Linux/xen-backend.rules     Tue Sep 21 12:17:04 2010 +0100
+++ b/tools/hotplug/Linux/xen-backend.rules     Tue Sep 21 15:59:01 2010 +0100
@@ -7,6 +7,10 @@ SUBSYSTEM=="xen-backend", KERNEL=="vscsi
 SUBSYSTEM=="xen-backend", KERNEL=="vscsi*", RUN+="/etc/xen/scripts/vscsi 
$env{ACTION}"
 SUBSYSTEM=="xen-backend", ACTION=="remove", 
RUN+="/etc/xen/scripts/xen-hotplug-cleanup"
 KERNEL=="evtchn", NAME="xen/%k"
-KERNEL=="blktap[0-9]*", NAME="xen/%k"
-KERNEL=="pci_iomul", NAME="xen/%k"
+SUBSYSTEM=="xen", KERNEL=="blktap[0-9]*", NAME="xen/%k", MODE="0600"
+SUBSYSTEM=="blktap2", KERNEL=="blktap[0-9]*", NAME="xen/blktap-2/%k", 
MODE="0600"
+KERNEL=="blktap-control", NAME="xen/blktap-2/control", MODE="0600"
+KERNEL=="gntdev", NAME="xen/%k", MODE="0600"
+KERNEL=="pci_iomul", NAME="xen/%k", MODE="0600"
+KERNEL=="tapdev[a-z]*", NAME="xen/blktap-2/tapdev%m", MODE="0600"
 SUBSYSTEM=="net", KERNEL=="tap*", ACTION=="add", 
RUN+="/etc/xen/scripts/vif-setup $env{ACTION} type_if=tap"

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools/hotplug: Linux udev rules adjustment, Xen patchbot-unstable <=