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

[Xen-devel] [PATCH 0/2] clean up blktap and change to use a dynamic majo

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 0/2] clean up blktap and change to use a dynamic major
From: Steven Rostedt <srostedt@xxxxxxxxxx>
Date: Wed, 27 Sep 2006 12:16:24 -0400
Cc: andrew.warfield@xxxxxxxxxxxx
Delivery-date: Wed, 27 Sep 2006 09:16:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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
User-agent: Thunderbird 1.5.0.4 (X11/20060614)
The following two patches are to clean up blktap.c and to make it use a dynamic major instead of a hardcoded one.

The first patch does two things:

1. cleans up the style to be more compatible with the Linux Style

2. gets rid of the private data structure used in filp->private_data

The private data structure only has one item and that is the idx (index into the tapfds descriptors). This is allocated on open of the device and freed on close. The idx element always is the same as the minor number. Instead of using this (which would not be accepted into the kernel), I got rid of the private structure completely and instead I have filp->private_data point to the descriptor itself. This cleans up the code a bit.


The second patch changes the blktap to use a dynamic major. Instead of a hardcoded 254, the number is dynamic, and the blktapctrl now reads /proc/devices to find the number to use to create the node.

NOTE: Currently and after this patch, the blktapctrl daemon creates the device node. This is not the way Linux should work, and this needs to be done by udev. That update should be next (after I learn how udev works :)

-- Steve

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

<Prev in Thread] Current Thread [Next in Thread>