aboutsummaryrefslogtreecommitdiffstats
path: root/linux-2.6.11-xen-sparse
diff options
context:
space:
mode:
authorakw27@arcadians.cl.cam.ac.uk <akw27@arcadians.cl.cam.ac.uk>2005-05-19 21:14:26 +0000
committerakw27@arcadians.cl.cam.ac.uk <akw27@arcadians.cl.cam.ac.uk>2005-05-19 21:14:26 +0000
commit33709a954fbac46d611b12e541fe1b9bed9ba969 (patch)
tree362df7b1c3dedead03e5e5814d36430cda32d803 /linux-2.6.11-xen-sparse
parent44085c92d663715de81e2d9eecded546959092c8 (diff)
parent90a17e697b5cefa83d00470203d02619ffb2fe1a (diff)
downloadxen-33709a954fbac46d611b12e541fe1b9bed9ba969.tar.gz
xen-33709a954fbac46d611b12e541fe1b9bed9ba969.tar.bz2
xen-33709a954fbac46d611b12e541fe1b9bed9ba969.zip
bitkeeper revision 1.1473 (428d01b2u1JOg4f95CAjC08qwbmHCg)
Merge arcadians.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk into arcadians.cl.cam.ac.uk:/auto/anfs/nos1/akw27/xeno-clone/xeno.bk
Diffstat (limited to 'linux-2.6.11-xen-sparse')
-rw-r--r--linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h3
-rw-r--r--linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c46
-rw-r--r--linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_datapath.c21
-rw-r--r--linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c3
4 files changed, 47 insertions, 26 deletions
diff --git a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h
index a55be6c23e..dac4b0a676 100644
--- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap.h
@@ -246,7 +246,8 @@ irqreturn_t blkif_ptfe_int(int irq, void *dev_id, struct pt_regs *regs);
extern void blkif_ctrlif_rx(ctrl_msg_t *msg, unsigned long id);
/* debug */
-void print_vm_ring_idxs(void);
+void print_fe_ring_idxs(void);
+void print_be_ring_idxs(void);
#define __BLKINT_H__
#endif
diff --git a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c
index 9b6272f369..060c6a2dd2 100644
--- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_controlmsg.c
@@ -104,7 +104,7 @@ void blkif_ptfe_create(blkif_be_create_t *create)
if ( (blkif = kmem_cache_alloc(blkif_cachep, GFP_KERNEL)) == NULL )
{
- DPRINTK("Could not create blkif: out of memory\n");
+ WPRINTK("Could not create blkif: out of memory\n");
create->status = BLKIF_BE_STATUS_OUT_OF_MEMORY;
return;
}
@@ -122,7 +122,7 @@ void blkif_ptfe_create(blkif_be_create_t *create)
{
if ( ((*pblkif)->domid == domid) && ((*pblkif)->handle == handle) )
{
- DPRINTK("Could not create blkif: already exists\n");
+ WPRINTK("Could not create blkif: already exists\n");
create->status = BLKIF_BE_STATUS_INTERFACE_EXISTS;
kmem_cache_free(blkif_cachep, blkif);
return;
@@ -189,7 +189,7 @@ void blkif_ptfe_connect(blkif_be_connect_t *connect)
blkif = blkif_find_by_handle(domid, handle);
if ( unlikely(blkif == NULL) )
{
- DPRINTK("blkif_connect attempted for non-existent blkif (%u,%u)\n",
+ WPRINTK("blkif_connect attempted for non-existent blkif (%u,%u)\n",
connect->domid, connect->blkif_handle);
connect->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND;
return;
@@ -253,7 +253,7 @@ int blkif_ptfe_disconnect(blkif_be_disconnect_t *disconnect, u8 rsp_id)
blkif = blkif_find_by_handle(domid, handle);
if ( unlikely(blkif == NULL) )
{
- DPRINTK("blkif_disconnect attempted for non-existent blkif"
+ WPRINTK("blkif_disconnect attempted for non-existent blkif"
" (%u,%u)\n", disconnect->domid, disconnect->blkif_handle);
disconnect->status = BLKIF_BE_STATUS_INTERFACE_NOT_FOUND;
return 1; /* Caller will send response error message. */
@@ -499,3 +499,41 @@ void __init blkif_interface_init(void)
blktap_be_ring.sring = NULL;
}
+
+
+
+/* Debug : print the current ring indices. */
+
+void print_fe_ring_idxs(void)
+{
+ int i;
+ blkif_t *blkif;
+
+ WPRINTK("FE Rings: \n---------\n");
+ for ( i = 0; i < BLKIF_HASHSZ; i++) {
+ blkif = blkif_hash[i];
+ while (blkif != NULL) {
+ if (blkif->status == DISCONNECTED) {
+ WPRINTK("(%2d,%2d) DISCONNECTED\n",
+ blkif->domid, blkif->handle);
+ } else if (blkif->status == DISCONNECTING) {
+ WPRINTK("(%2d,%2d) DISCONNECTING\n",
+ blkif->domid, blkif->handle);
+ } else if (blkif->blk_ring.sring == NULL) {
+ WPRINTK("(%2d,%2d) CONNECTED, but null sring!\n",
+ blkif->domid, blkif->handle);
+ } else {
+ blkif_get(blkif);
+ WPRINTK("(%2d,%2d): req_cons: %2d, rsp_prod_prv: %2d "
+ "| req_prod: %2d, rsp_prod: %2d\n",
+ blkif->domid, blkif->handle,
+ blkif->blk_ring.req_cons,
+ blkif->blk_ring.rsp_prod_pvt,
+ blkif->blk_ring.sring->req_prod,
+ blkif->blk_ring.sring->rsp_prod);
+ blkif_put(blkif);
+ }
+ blkif = blkif->hash_next;
+ }
+ }
+}
diff --git a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_datapath.c b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_datapath.c
index a58e49fa09..7eebcf120f 100644
--- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_datapath.c
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_datapath.c
@@ -439,27 +439,8 @@ irqreturn_t blkif_ptbe_int(int irq, void *dev_id,
/* Debug : print the current ring indices. */
-void print_vm_ring_idxs(void)
+void print_be_ring_idxs(void)
{
- int i;
- blkif_t *blkif;
-
- WPRINTK("FE Rings: \n---------\n");
- for ( i = 0; i < 50; i++) {
- blkif = blkif_find_by_handle((domid_t)i, 0);
- if (blkif != NULL) {
- if (blkif->blk_ring.sring != NULL) {
- WPRINTK("%2d: req_cons: %2d, rsp_prod_prv: %2d "
- "| req_prod: %2d, rsp_prod: %2d\n", i,
- blkif->blk_ring.req_cons,
- blkif->blk_ring.rsp_prod_pvt,
- blkif->blk_ring.sring->req_prod,
- blkif->blk_ring.sring->rsp_prod);
- } else {
- WPRINTK("%2d: [no device channel yet]\n", i);
- }
- }
- }
if (blktap_be_ring.sring != NULL) {
WPRINTK("BE Ring: \n--------\n");
WPRINTK("BE: rsp_cons: %2d, req_prod_prv: %2d "
diff --git a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c
index 31d6830417..78a487662e 100644
--- a/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c
+++ b/linux-2.6.11-xen-sparse/drivers/xen/blktap/blktap_userdev.c
@@ -227,7 +227,8 @@ static int blktap_ioctl(struct inode *inode, struct file *filp,
}
case BLKTAP_IOCTL_PRINT_IDXS:
{
- print_vm_ring_idxs();
+ print_be_ring_idxs();
+ print_fe_ring_idxs();
WPRINTK("User Rings: \n-----------\n");
WPRINTK("UF: rsp_cons: %2d, req_prod_prv: %2d "
"| req_prod: %2d, rsp_prod: %2d\n",