]> xenbits.xensource.com Git - people/ssmith/nc2-2.6.27.git/commitdiff
patch ratelimit-blktap-wprintk
authorSteven Smith <ssmith@weybridge.uk.xensource.com>
Tue, 30 Jun 2009 11:55:48 +0000 (12:55 +0100)
committerSteven Smith <ssmith@weybridge.uk.xensource.com>
Tue, 30 Jun 2009 11:55:48 +0000 (12:55 +0100)
drivers/xen/blktap/blktap.c
drivers/xen/blktap/common.h

index 484bb26a2b8341c55aae11114a7b1f12c436df8e..dffea16a005deb08f6c9902ff8c4a41b7f831b44 100644 (file)
@@ -1139,6 +1139,12 @@ static int do_block_io_op(tap_blkif_t *info)
                        msleep(1);
                        WPRINTK("unknown operation [%d]\n",
                                req.operation);
+                       WPRINTK("req_prod: 0x%08x, req_cons: 0x%08x, "
+                               "rsp_prod: 0x%08x, rsp_prod_pvt: 0x%08x\n",
+                               blk_rings->common.sring->req_prod,
+                               blk_rings->common.req_cons,
+                               blk_rings->common.sring->rsp_prod,
+                               blk_rings->common.rsp_prod_pvt);
                        make_response(blkif, req.id, req.operation,
                                      BLKIF_RSP_ERROR);
                        free_req(pending_req);
index 37a43366c95e22b31a137f387b52ce6fe515df7e..d12a99cef4eb3f28619344b1f85d02e2968f88b9 100644 (file)
 #define DPRINTK(_f, _a...) pr_debug("(file=%s, line=%d) " _f, \
                                     __FILE__ , __LINE__ , ## _a )
 
-#define WPRINTK(fmt, args...) printk(KERN_WARNING "blk_tap: " fmt, ##args)
+#define WPRINTK(fmt, args...)                                         \
+do {                                                                  \
+       if (printk_ratelimit())                                       \
+               printk(KERN_WARNING "blk_tap: " fmt, ##args);         \
+} while (0)
 
 struct backend_info;