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-devel

Re: [Xen-devel] [PATCH 1 of 3] If Xen backend modules are not loaded, lo

To: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1 of 3] If Xen backend modules are not loaded, load them before starting Xend
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Tue, 22 Dec 2009 21:59:57 +0000
Cc: Keir, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Fraser <Keir.Fraser@xxxxxxxxxxxxx>
Delivery-date: Tue, 22 Dec 2009 14:00:31 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20091222195753.GB31761@xxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <patchbomb.1261500535@xxxxxxxxxxxxxxxxxxx> <7bd805a543da685a3dba.1261500536@xxxxxxxxxxxxxxxxxxx> <1261510877.27802.19.camel@xxxxxxxxxxxxxxxxxxxxx> <20091222195753.GB31761@xxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, 2009-12-22 at 19:57 +0000, Konrad Rzeszutek Wilk wrote: 
> On Tue, Dec 22, 2009 at 07:41:17PM +0000, Ian Campbell wrote:
> > On Tue, 2009-12-22 at 16:48 +0000, Konrad Rzeszutek Wilk wrote:
> > > @@ -28,6 +28,7 @@
> > >       grep '    xenfs$' /proc/filesystems >/dev/null && \
> > >     ! grep '^xenfs ' /proc/mounts >/dev/null;
> > >  then
> > > +       modprobe -q xenfs
> > >         mount -t xenfs xenfs /proc/xen
> > >  fi
> > >   
> > 
> > I think this one gets requested automatically if the filesystem isn't
> > currently present, see the call to request_module in
> > fs/filesystems.c:get_fs_type()
> 
> Hmm, in 2.6.32 it looks to be usuable only once the filesystem has
> loaded. This patch is for the case where the filesystem (xenfs) is compiled
> as a module - and had not been loaded. Hence hadn't had a chance to call
> fs/filesystem.c:register_filesystem().

Are you looking at __get_fs_type() and not get_fs_type()? The later is: 
        struct file_system_type *get_fs_type(const char *name)
        {
                struct file_system_type *fs;
                const char *dot = strchr(name, '.');
                int len = dot ? dot - name : strlen(name);
        
                fs = __get_fs_type(name, len);
                if (!fs && (request_module("%.*s", len, name) == 0))
                        fs = __get_fs_type(name, len);
        ....

So either the module is already loaded (or its statically compiled) or
it calls request_module to cause it to become loaded and the second
__get_fs_type succeeds. 

> Thought maybe I messing up this up. The "grep 'xenfs$' /proc/filesystem" 
> checks
> for xenfs in /proc/filesystem so it should not even get to the "then" 
> statement.

Yes, the script looks wrong to me before your patch as well, the check
of /proc/filesystem should be removed.

> Something is fishy here. Why don't we skip this patch and I will revist it
> after holidays.
> 

OK

Ian.


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