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

[Xen-changelog] [linux-2.6.18-xen] Blktap kernel compat layer

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] Blktap kernel compat layer
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Jul 2008 09:30:25 -0700
Delivery-date: Wed, 09 Jul 2008 09:31:06 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1215596648 -3600
# Node ID f1d726b984a35e13ff69402b30b57611328c85bb
# Parent  db4f08203b8a3ecd8a633a3593f5b4fd363ea37c
Blktap kernel compat layer

The kernel side of the blktap extended vbd compatibility layer.

Signed-off-by: Chris Lalancette <clalance@xxxxxxxxxx>
---
 drivers/xen/blktap/blktap.c |   30 ++++++++++++++++++++++++++++--
 1 files changed, 28 insertions(+), 2 deletions(-)

diff -r db4f08203b8a -r f1d726b984a3 drivers/xen/blktap/blktap.c
--- a/drivers/xen/blktap/blktap.c       Tue Jul 08 09:31:24 2008 +0100
+++ b/drivers/xen/blktap/blktap.c       Wed Jul 09 10:44:08 2008 +0100
@@ -89,8 +89,13 @@ static int mmap_pages = MMAP_PAGES;
 /*Data struct handed back to userspace for tapdisk device to VBD mapping*/
 typedef struct domid_translate {
        unsigned short domid;
+       unsigned short busid;
+} domid_translate_t ;
+
+typedef struct domid_translate_ext {
+       unsigned short domid;
        u32 busid;
-} domid_translate_t ;
+} domid_translate_ext_t ;
 
 /*Data struct associated with each of the tapdisk devices*/
 typedef struct tap_blkif {
@@ -110,7 +115,7 @@ typedef struct tap_blkif {
        unsigned long *idx_map;       /*Record the user ring id to kern 
                                        [req id, idx] tuple                  */
        blkif_t *blkif;               /*Associate blkif with tapdev          */
-       struct domid_translate trans; /*Translation from domid to bus.       */
+       struct domid_translate_ext trans; /*Translation from domid to bus.   */
 } tap_blkif_t;
 
 static struct tap_blkif *tapfds[MAX_TAP_DEV];
@@ -213,6 +218,7 @@ static int blktap_major;
 #define BLKTAP_IOCTL_MAJOR          7
 #define BLKTAP_QUERY_ALLOC_REQS      8
 #define BLKTAP_IOCTL_FREEINTF        9
+#define BLKTAP_IOCTL_NEWINTF_EXT     50
 #define BLKTAP_IOCTL_PRINT_IDXS      100  
 
 /* blktap switching modes: (Set with BLKTAP_IOCTL_SETMODE)             */
@@ -782,6 +788,26 @@ static int blktap_ioctl(struct inode *in
                }
                info->trans.domid = tr->domid;
                info->trans.busid = tr->busid;
+               return info->minor;
+       }
+       case BLKTAP_IOCTL_NEWINTF_EXT:
+       {
+               void __user *udata = (void __user *) arg;
+               domid_translate_ext_t tr;
+
+               if (copy_from_user(&tr, udata, sizeof(domid_translate_ext_t)))
+                       return -EFAULT;
+
+               DPRINTK("NEWINTF_EXT Req for domid %d and bus id %d\n", 
+                      tr.domid, tr.busid);
+               info = get_next_free_dev();
+               if (!info) {
+                       WPRINTK("Error initialising /dev/xen/blktap - "
+                               "No more devices\n");
+                       return -1;
+               }
+               info->trans.domid = tr.domid;
+               info->trans.busid = tr.busid;
                return info->minor;
        }
        case BLKTAP_IOCTL_FREEINTF:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] Blktap kernel compat layer, Xen patchbot-linux-2.6.18-xen <=