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] Clean up blktaplib headers.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Clean up blktaplib headers.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Thu, 09 Jun 2005 13:37:53 +0000
Delivery-date: Thu, 09 Jun 2005 16:01:29 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1698, 2005/06/09 14:37:53+01:00, akw27@xxxxxxxxxxxxxxxxxxxxxx

        Clean up blktaplib headers.
        
        Signed-off-by: Nguyen Anh Quynh <aquynh@xxxxxxxxx>
        Signed-off-by: andrew.warfield@xxxxxxxxxxxx



 b/tools/blktap/blktaplib.h |   50 +++++++++++++++++++--
 tools/blktap/blkint.h      |  105 ---------------------------------------------
 2 files changed, 46 insertions(+), 109 deletions(-)


diff -Nru a/tools/blktap/blkint.h b/tools/blktap/blkint.h
--- a/tools/blktap/blkint.h     2005-06-09 12:02:26 -04:00
+++ /dev/null   Wed Dec 31 16:00:00 196900
@@ -1,105 +0,0 @@
-/*
- * blkint.h
- * 
- * Interfaces for the Xen block interposition driver.
- * 
- * (c) 2004, Andrew Warfield, University of Cambridge
- * 
- */
-
-#ifndef __BLKINT_H__
-
-//#include "blkif.h"
-
-
-#if 0
-/* Types of ring. */
-#define BLKIF_REQ_RING_TYPE 1
-#define BLKIF_RSP_RING_TYPE 2
-
-/* generic ring struct. */
-typedef struct blkif_generic_ring_struct {
-    int type;
-} blkif_generic_ring_t;
-
-/* A requestor's view of a ring. */
-typedef struct blkif_req_ring_struct {
-
-    int type;                    /* Will be BLKIF_REQ_RING_TYPE        */
-    BLKIF_RING_IDX req_prod;     /* PRIVATE req_prod index             */
-    BLKIF_RING_IDX rsp_cons;     /* Response consumer index            */
-    blkif_ring_t *ring;          /* Pointer to shared ring struct      */
-
-} blkif_req_ring_t;
-
-#define BLKIF_REQ_RING_INIT { BLKIF_REQ_RING_TYPE, 0, 0, 0 }
-
-/* A responder's view of a ring. */
-typedef struct blkif_rsp_ring_struct {
-
-    int type;                    /* Will be BLKIF_REQ_RING_TYPE        */
-    BLKIF_RING_IDX rsp_prod;     /* PRIVATE rsp_prod index             */
-    BLKIF_RING_IDX req_cons;     /* Request consumer index             */
-    blkif_ring_t *ring;          /* Pointer to shared ring struct      */
-
-} blkif_rsp_ring_t;
-
-#define BLKIF_RSP_RING_INIT { BLKIF_RSP_RING_TYPE, 0, 0, 0 }
-
-#define RING(a) (blkif_generic_ring_t *)(a)
-inline int BLKTAP_RING_FULL(blkif_generic_ring_t *ring);
-#endif
-
-/* -------[ interposition -> character device interface ]------------- */
-
-/* /dev/xen/blktap resides at device number major=10, minor=202        */ 
-#define BLKTAP_MINOR 202
-
-/* size of the extra VMA area to map in attached pages. */
-#define BLKTAP_VMA_PAGES BLKIF_RING_SIZE
-
-/* blktap IOCTLs:                                                      */
-#define BLKTAP_IOCTL_KICK_FE         1
-#define BLKTAP_IOCTL_KICK_BE         2
-#define BLKTAP_IOCTL_SETMODE         3
-#define BLKTAP_IOCTL_PRINT_IDXS      100   
-
-/* blktap switching modes: (Set with BLKTAP_IOCTL_SETMODE)             */
-#define BLKTAP_MODE_PASSTHROUGH      0x00000000  /* default            */
-#define BLKTAP_MODE_INTERCEPT_FE     0x00000001
-#define BLKTAP_MODE_INTERCEPT_BE     0x00000002
-#define BLKTAP_MODE_COPY_FE          0x00000004
-#define BLKTAP_MODE_COPY_BE          0x00000008
-#define BLKTAP_MODE_COPY_FE_PAGES    0x00000010
-#define BLKTAP_MODE_COPY_BE_PAGES    0x00000020
-
-#define BLKTAP_MODE_INTERPOSE \
-           (BLKTAP_MODE_INTERCEPT_FE | BLKTAP_MODE_INTERCEPT_BE)
-
-#define BLKTAP_MODE_COPY_BOTH \
-           (BLKTAP_MODE_COPY_FE | BLKTAP_MODE_COPY_BE)
-
-#define BLKTAP_MODE_COPY_BOTH_PAGES \
-           (BLKTAP_MODE_COPY_FE_PAGES | BLKTAP_MODE_COPY_BE_PAGES)
-
-static inline int BLKTAP_MODE_VALID(unsigned long arg)
-{
-    return (
-        ( arg == BLKTAP_MODE_PASSTHROUGH  ) ||
-        ( arg == BLKTAP_MODE_INTERCEPT_FE ) ||
-        ( arg == BLKTAP_MODE_INTERCEPT_BE ) ||
-        ( arg == BLKTAP_MODE_INTERPOSE    ) ||
-        ( (arg & ~BLKTAP_MODE_COPY_FE_PAGES) == BLKTAP_MODE_COPY_FE ) ||
-        ( (arg & ~BLKTAP_MODE_COPY_BE_PAGES) == BLKTAP_MODE_COPY_BE ) ||
-        ( (arg & ~BLKTAP_MODE_COPY_BOTH_PAGES) == BLKTAP_MODE_COPY_BOTH )
-        );
-}
-
-
-
-
-
-
-
-#define __BLKINT_H__
-#endif
diff -Nru a/tools/blktap/blktaplib.h b/tools/blktap/blktaplib.h
--- a/tools/blktap/blktaplib.h  2005-06-09 12:02:26 -04:00
+++ b/tools/blktap/blktaplib.h  2005-06-09 12:02:26 -04:00
@@ -2,7 +2,6 @@
  *
  * userland accessors to the block tap.
  *
- * for the moment this is rather simple.
  */
  
 #ifndef __BLKTAPLIB_H__
@@ -14,8 +13,51 @@
 #include <xen/io/blkif.h>
 #include <xen/io/ring.h>
 #include <xen/io/domain_controller.h>
-#include "blkint.h"
 
+/* /dev/xen/blktap resides at device number major=10, minor=202        */ 
+#define BLKTAP_MINOR 202
+
+/* size of the extra VMA area to map in attached pages. */
+#define BLKTAP_VMA_PAGES BLKIF_RING_SIZE
+
+/* blktap IOCTLs:                                                      */
+#define BLKTAP_IOCTL_KICK_FE         1
+#define BLKTAP_IOCTL_KICK_BE         2
+#define BLKTAP_IOCTL_SETMODE         3
+#define BLKTAP_IOCTL_PRINT_IDXS      100   
+
+/* blktap switching modes: (Set with BLKTAP_IOCTL_SETMODE)             */
+#define BLKTAP_MODE_PASSTHROUGH      0x00000000  /* default            */
+#define BLKTAP_MODE_INTERCEPT_FE     0x00000001
+#define BLKTAP_MODE_INTERCEPT_BE     0x00000002
+#define BLKTAP_MODE_COPY_FE          0x00000004
+#define BLKTAP_MODE_COPY_BE          0x00000008
+#define BLKTAP_MODE_COPY_FE_PAGES    0x00000010
+#define BLKTAP_MODE_COPY_BE_PAGES    0x00000020
+
+#define BLKTAP_MODE_INTERPOSE \
+           (BLKTAP_MODE_INTERCEPT_FE | BLKTAP_MODE_INTERCEPT_BE)
+
+#define BLKTAP_MODE_COPY_BOTH \
+           (BLKTAP_MODE_COPY_FE | BLKTAP_MODE_COPY_BE)
+
+#define BLKTAP_MODE_COPY_BOTH_PAGES \
+           (BLKTAP_MODE_COPY_FE_PAGES | BLKTAP_MODE_COPY_BE_PAGES)
+
+static inline int BLKTAP_MODE_VALID(unsigned long arg)
+{
+    return (
+        ( arg == BLKTAP_MODE_PASSTHROUGH  ) ||
+        ( arg == BLKTAP_MODE_INTERCEPT_FE ) ||
+        ( arg == BLKTAP_MODE_INTERCEPT_BE ) ||
+        ( arg == BLKTAP_MODE_INTERPOSE    ) ||
+        ( (arg & ~BLKTAP_MODE_COPY_FE_PAGES) == BLKTAP_MODE_COPY_FE ) ||
+        ( (arg & ~BLKTAP_MODE_COPY_BE_PAGES) == BLKTAP_MODE_COPY_BE ) ||
+        ( (arg & ~BLKTAP_MODE_COPY_BOTH_PAGES) == BLKTAP_MODE_COPY_BOTH )
+        );
+}
+
+/* Return values for handling messages in hooks. */
 #define BLKTAP_PASS     0 /* Keep passing this request as normal. */
 #define BLKTAP_RESPOND  1 /* Request is now a reply.  Return it.  */
 #define BLKTAP_STOLEN   2 /* Hook has stolen request.             */
@@ -33,7 +75,7 @@
 void blktap_detach_poll(int fd);
 int  blktap_listen(void);
 
-/*-----[ Accessing attached data page mappings ]-------------------------*/
+/* Accessing attached data page mappings */
 #define MMAP_PAGES_PER_REQUEST \
     (BLKIF_MAX_SEGMENTS_PER_REQUEST + 1)
 #define MMAP_VADDR(_req,_seg)                        \
@@ -44,7 +86,7 @@
 extern unsigned long mmap_vstart;
 
 
-/*-----[ Defines that are only used by library clients ]-----------------*/
+/* Defines that are only used by library clients */
 
 #ifndef __COMPILING_BLKTAP_LIB
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Clean up blktaplib headers., BitKeeper Bot <=