Skip to content

clean up blktap and change to use a dynamic major

Steven Rostedt xen-devel 1 version Applied

Status from this message: Applied, thank you. Great clean-up.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2clean up blktap and remove private structurelinux-2.6-xen-sparse/drivers/xen/blktap/blktap.c+57 -781 reply
2/2have blktap use a dynamic majorlinux-2.6-xen-sparse/drivers/xen/blktap/blktap.c tools/blktap/drivers/blktapctrl.c tools/blktap/lib/blktaplib.h+53 -111 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] clean up blktap and change to use a dynamic major

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