Skip to contentSkip to conversation

xencommons: modprobe xenfs if it not be loaded

PATCH In review Yu Zhiguo 4 participants 12 messages Jun 19, 2010 – Jun 22, 2010

lore
Share & tools
lore

Yu Zhiguo

author
#0 lore raw

PATCH 1/1 xencommons: modprobe xenfs if it not be loaded

If xenfs is compiled as a module, now cannot complete 'service xencommons start', modprobe xenfs can fix it.

tools/hotplug/Linux/init.d/xencommons +13 -8
diff -r 659e4b69d26b -r f6b44890c298 tools/hotplug/Linux/init.d/xencommons
@@ -24,16 +24,21 @@
 XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
 shopt -s extglob
 
-if test "x$1" = xstart && \
-     test -d /proc/xen && \
-   ! test -d /proc/xen/capabilities && \
-     grep '	xenfs$' /proc/filesystems >/dev/null && \
-   ! grep '^xenfs ' /proc/mounts >/dev/null;
-then
-	mount -t xenfs xenfs /proc/xen
+if test "x$1" = xstart; then
+	if ! grep '	xenfs$' /proc/filesystems >/dev/null; then
+		test -x /sbin/modprobe && /sbin/modprobe xenfs
+	fi
+	if test -d /proc/xen && \
+	    ! test -d /proc/xen/capabilities && \
+	      grep '	xenfs$' /proc/filesystems >/dev/null && \
+	    ! grep '^xenfs ' /proc/mounts >/dev/null;
+	then
+		mount -t xenfs xenfs /proc/xen
+	fi
 fi
 
-if ! grep -q "control_d" /proc/xen/capabilities ; then
+if ! test -e /proc/xen/capabilities || \
+    ! grep -q "control_d" /proc/xen/capabilities ; then
 	exit 0
 fi
author
#1 lore raw

Do a small fix in order to be compatible with the old Dom0 kernel which has no xenfs.ko.

-----------

If xenfs is compiled as a module, now cannot complete 'service xencommons start', modprobe xenfs can fix it.

tools/hotplug/Linux/init.d/xencommons +13 -8
diff -r b9c541d9c138 -r 96978e701b26 tools/hotplug/Linux/init.d/xencommons
@@ -24,16 +24,21 @@
 XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
 shopt -s extglob
 
-if test "x$1" = xstart && \
-     test -d /proc/xen && \
-   ! test -d /proc/xen/capabilities && \
-     grep '	xenfs$' /proc/filesystems >/dev/null && \
-   ! grep '^xenfs ' /proc/mounts >/dev/null;
-then
-	mount -t xenfs xenfs /proc/xen
+if test "x$1" = xstart; then
+	if ! grep '	xenfs$' /proc/filesystems >/dev/null; then
+		test -x /sbin/modprobe && /sbin/modprobe xenfs 2>/dev/null
+	fi
+	if test -d /proc/xen && \
+	    ! test -d /proc/xen/capabilities && \
+	      grep '	xenfs$' /proc/filesystems >/dev/null && \
+	    ! grep '^xenfs ' /proc/mounts >/dev/null;
+	then
+		mount -t xenfs xenfs /proc/xen
+	fi
 fi
 
-if ! grep -q "control_d" /proc/xen/capabilities ; then
+if ! test -e /proc/xen/capabilities || \
+    ! grep -q "control_d" /proc/xen/capabilities ; then
 	exit 0
 fi
#2 lore raw
Quoted 8 lines · Yu Zhiguo

Do a small fix in order to be compatible with the old Dom0 kernel which has no xenfs.ko.

-----------

If xenfs is compiled as a module, now cannot complete 'service xencommons start', modprobe xenfs can fix it.

It should just be sufficient to explicitly mount /proc/xen, which will trigger a modprobe if necessary.

J

Quoted 42 lines

diff -r b9c541d9c138 -r 96978e701b26 tools/hotplug/Linux/init.d/xencommons

tools/hotplug/Linux/init.d/xencommons +13 -8
@@ -24,16 +24,21 @@
 XENCONSOLED_PIDFILE=/var/run/xenconsoled.pid
 shopt -s extglob
 
-if test "x$1" = xstart && \
-     test -d /proc/xen && \
-   ! test -d /proc/xen/capabilities && \
-     grep '	xenfs$' /proc/filesystems >/dev/null && \
-   ! grep '^xenfs ' /proc/mounts >/dev/null;
-then
-	mount -t xenfs xenfs /proc/xen
+if test "x$1" = xstart; then
+	if ! grep '	xenfs$' /proc/filesystems >/dev/null; then
+		test -x /sbin/modprobe && /sbin/modprobe xenfs 2>/dev/null
+	fi
+	if test -d /proc/xen && \
+	    ! test -d /proc/xen/capabilities && \
+	      grep '	xenfs$' /proc/filesystems >/dev/null && \
+	    ! grep '^xenfs ' /proc/mounts >/dev/null;
+	then
+		mount -t xenfs xenfs /proc/xen
+	fi
 fi
 
-if ! grep -q "control_d" /proc/xen/capabilities ; then
+if ! test -e /proc/xen/capabilities || \
+    ! grep -q "control_d" /proc/xen/capabilities ; then
 	exit 0
 fi
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw

Jeremy Fitzhardinge writes ("Re: [Xen-devel] [PATCH] xencommons: modprobe xenfs if it not be loaded"):

Quoted 2 lines

It should just be sufficient to explicitly mount /proc/xen, which will trigger a modprobe if necessary.

That sounds like a Nak of the patch to me. Unfortunately it has already been applied (21641).

Ian.

#4 lore raw
Quoted 8 lines · Ian Jackson

Jeremy Fitzhardinge writes ("Re: [Xen-devel] [PATCH] xencommons: modprobe xenfs if it not be loaded"):

Quoted 3 lines

It should just be sufficient to explicitly mount /proc/xen, which will trigger a modprobe if necessary.

That sounds like a Nak of the patch to me. Unfortunately it has already been applied (21641).

Is that tangled up in staging?

J

#5 lore raw

Jeremy Fitzhardinge writes ("Re: [Xen-devel] [PATCH] xencommons: modprobe xenfs if it not be loaded"):

Quoted 1 line

Is that tangled up in staging?

Yes, it's in staging but not in main xen-unstable.

Ian.

#6 lore raw
In reply to Jeremy Fitzhardinge
Quoted 5 lines · Jeremy Fitzhardinge
Quoted 3 lines

That sounds like a Nak of the patch to me. Unfortunately it has already been applied (21641).

Is that tangled up in staging?

We haven't pushed automatically from staging in weeks. Possibly months.

-- Keir

#7 lore raw
In reply to Ian Jackson
Quoted 7 lines · Ian Jackson

Jeremy Fitzhardinge writes ("Re: [Xen-devel] [PATCH] xencommons: modprobe xenfs if it not be loaded"):

Quoted 2 lines

It should just be sufficient to explicitly mount /proc/xen, which will trigger a modprobe if necessary.

That sounds like a Nak of the patch to me. Unfortunately it has already been applied (21641).

I can revert it.

Should I leave tools patches unapplied for a week, perhaps?

-- Keir

#8 lore raw
Quoted 6 lines · Keir Fraser
Quoted 3 lines · Ian Jackson

Jeremy Fitzhardinge writes ("Re: [Xen-devel] [PATCH] xencommons: modprobe xenfs if it not be loaded"):

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

It should just be sufficient to explicitly mount /proc/xen, which will trigger a modprobe if necessary.

That sounds like a Nak of the patch to me. Unfortunately it has already been applied (21641).

I can revert it.

I think so.

Quoted 2 lines

Should I leave tools patches unapplied for a week, perhaps?

You mean the policy is that if a patch is not interesting enough to draw comment, you'll accept it by default after a week? What about waiting until there are either positive or negative comments, and suggesting the poster ping if the patch is uncommented on after a day or two?

J

#9 lore raw
Quoted 6 lines · Jeremy Fitzhardinge
Quoted 1 line

Should I leave tools patches unapplied for a week, perhaps?

You mean the policy is that if a patch is not interesting enough to draw comment, you'll accept it by default after a week? What about waiting until there are either positive or negative comments, and suggesting the poster ping if the patch is uncommented on after a day or two?

Well, possibly. I think that will leave a lot of patches unapplied. Perhaps that is for the best, of course.

-- Keir

author
#10 lore raw

Re: [PATCH] xencommons: mount xenfs directly if xenfs it not be loaded

In reply to Jeremy Fitzhardinge

Hi Jeremy

Quoted 7 lines · Jeremy Fitzhardinge
Quoted 1 line

It should just be sufficient to explicitly mount /proc/xen, which will trigger a modprobe if necessary.

J

OK, I fixed it, new patch is here.
Just deleted check for xenfs support before mount xenfs.

------------------

If xenfs is compiled as a module, now cannot complete 'service xencommons start', mount xenfs directly can fix it, it can trigger modprobe xenfs.

tools/hotplug/Linux/init.d/xencommons +0 -1
diff -r bd3bf925f4ce -r 6c8c32876b30 tools/hotplug/Linux/init.d/xencommons
@@ -27,7 +27,6 @@
 if test "x$1" = xstart && \
      test -d /proc/xen && \
    ! test -d /proc/xen/capabilities && \
-     grep '	xenfs$' /proc/filesystems >/dev/null && \
    ! grep '^xenfs ' /proc/mounts >/dev/null;
 then
 	mount -t xenfs xenfs /proc/xen
#11 lore raw

Re: [PATCH] xencommons: mount xenfs directly if xenfs it not be loaded

Yu Zhiguo writes ("Re: [Xen-devel] [PATCH] xencommons: mount xenfs directly if xenfs it not be loaded"):

Quoted 2 lines

OK, I fixed it, new patch is here.
Just deleted check for xenfs support before mount xenfs.

This looks better, thanks.

Ian.