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] Help/problems with blktap on xen-unstable

To: "Roland Paterson-Jones" <roland@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: RE: [Xen-devel] Help/problems with blktap on xen-unstable
From: "Petersson, Mats" <Mats.Petersson@xxxxxxx>
Date: Wed, 20 Sep 2006 15:53:01 +0200
Delivery-date: Wed, 20 Sep 2006 06:55:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <451145BB.2010503@xxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acbcuzv3eQzItf+1Q0mLdQ80LwesmgAAFAlg
Thread-topic: [Xen-devel] Help/problems with blktap on xen-unstable
 

> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx 
> [mailto:xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Roland Paterson-Jones
> Sent: 20 September 2006 14:44
> To: xen-devel@xxxxxxxxxxxxxxxxxxx
> Subject: Re: [Xen-devel] Help/problems with blktap on xen-unstable
> 
> Roland Paterson-Jones wrote:
> 
> >  So, I guess I need to recompile with an alternate device 
> major number.
> 
> I can find the following refs to 254 in the source (some are dups):
> 
> ./linux-2.6.16.13-xen0/drivers/xen/blktap/blktap.c:              
> major=254, minor numbers begin at 0            */
> ./linux-2.6.16.13-xen0/drivers/xen/blktap/blktap.c:#define 
> BLKTAP_DEV_MAJOR 254         /* TODO: Make major number dynamic  *
> ./linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c:              
> major=254, minor numbers begin at 0            */
> ./linux-2.6-xen-sparse/drivers/xen/blktap/blktap.c:#define 
> BLKTAP_DEV_MAJOR 254         /* TODO: Make major number dynamic  *
> ./tools/blktap/lib/blktaplib.h:#define BLKTAP_DEV_MAJOR 254
> ./tools/blktap/drivers/blktapctrl.c:    
> make_blktap_dev(devname,254,0);
> ./tools/blktap_user/aiotools/blktapctrl.c:    
> make_blktap_dev(devname,254,0);
> ./tools/blktap_user/blktaplib.h:#define BLKTAP_DEV_MAJOR 254
> 
> I'm guessing it would be good to have one definition, but I'm not too 
> familiar with the code structure. Can a .h file span kernel and user 
> source? 

There's nothing preventing the same file being used in both kernel and
user-mode compiles - in fact in this case it would probably be a good
idea to ADD such a header-file - I'm not sure if there's anything ELSE
that should go into such a file [presumably there is some shared data
structures too that could go in there]. The above use of the same
constant in three places + using the same as a magic number is
definitely b0rkened... 

--
Mats



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