diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 16:42:31 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 16:42:31 -0400 |
commit | ebe8190659244ec21b5f16950cf7b156f5b7eb01 (patch) | |
tree | 8c76e74f11b00a6724655fb351eaf601271d3a25 /drivers/block/xen-blkback/blkback.c | |
parent | 01f37f2d53e14a05b7fc3601d182f31ac3b35847 (diff) |
xen/blkback: Change printk/DPRINTK to pr_.. type variant.
And also make them uniform and prefix the message with 'xen-blkback'.
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/block/xen-blkback/blkback.c')
-rw-r--r-- | drivers/block/xen-blkback/blkback.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 6808cc7d9c73..5c9568e39eab 100644 --- a/drivers/block/xen-blkback/blkback.c +++ b/drivers/block/xen-blkback/blkback.c | |||
@@ -196,20 +196,20 @@ static void vbd_resize(struct blkif_st *blkif) | |||
196 | struct xenbus_device *dev = xen_blkbk_xenbus(blkif->be); | 196 | struct xenbus_device *dev = xen_blkbk_xenbus(blkif->be); |
197 | unsigned long long new_size = vbd_sz(vbd); | 197 | unsigned long long new_size = vbd_sz(vbd); |
198 | 198 | ||
199 | printk(KERN_INFO "VBD Resize: Domid: %d, Device: (%d, %d)\n", | 199 | pr_info("xen-blkback: VBD Resize: Domid: %d, Device: (%d, %d)\n", |
200 | blkif->domid, MAJOR(vbd->pdevice), MINOR(vbd->pdevice)); | 200 | blkif->domid, MAJOR(vbd->pdevice), MINOR(vbd->pdevice)); |
201 | printk(KERN_INFO "VBD Resize: new size %llu\n", new_size); | 201 | pr_info("xen-blkback: VBD Resize: new size %llu\n", new_size); |
202 | vbd->size = new_size; | 202 | vbd->size = new_size; |
203 | again: | 203 | again: |
204 | err = xenbus_transaction_start(&xbt); | 204 | err = xenbus_transaction_start(&xbt); |
205 | if (err) { | 205 | if (err) { |
206 | printk(KERN_WARNING "Error starting transaction"); | 206 | pr_warn("xen-blkback: Error starting transaction"); |
207 | return; | 207 | return; |
208 | } | 208 | } |
209 | err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu", | 209 | err = xenbus_printf(xbt, dev->nodename, "sectors", "%llu", |
210 | (unsigned long long)vbd_sz(vbd)); | 210 | (unsigned long long)vbd_sz(vbd)); |
211 | if (err) { | 211 | if (err) { |
212 | printk(KERN_WARNING "Error writing new size"); | 212 | pr_warn("xen-blkback: Error writing new size"); |
213 | goto abort; | 213 | goto abort; |
214 | } | 214 | } |
215 | /* | 215 | /* |
@@ -219,7 +219,7 @@ again: | |||
219 | */ | 219 | */ |
220 | err = xenbus_printf(xbt, dev->nodename, "state", "%d", dev->state); | 220 | err = xenbus_printf(xbt, dev->nodename, "state", "%d", dev->state); |
221 | if (err) { | 221 | if (err) { |
222 | printk(KERN_WARNING "Error writing the state"); | 222 | pr_warn("xen-blkback: Error writing the state"); |
223 | goto abort; | 223 | goto abort; |
224 | } | 224 | } |
225 | 225 | ||
@@ -227,7 +227,7 @@ again: | |||
227 | if (err == -EAGAIN) | 227 | if (err == -EAGAIN) |
228 | goto again; | 228 | goto again; |
229 | if (err) | 229 | if (err) |
230 | printk(KERN_WARNING "Error ending transaction"); | 230 | pr_warn("xen-blkback: Error ending transaction"); |
231 | abort: | 231 | abort: |
232 | xenbus_transaction_end(xbt, 1); | 232 | xenbus_transaction_end(xbt, 1); |
233 | } | 233 | } |
@@ -253,9 +253,9 @@ irqreturn_t xen_blkif_be_int(int irq, void *dev_id) | |||
253 | 253 | ||
254 | static void print_stats(struct blkif_st *blkif) | 254 | static void print_stats(struct blkif_st *blkif) |
255 | { | 255 | { |
256 | printk(KERN_DEBUG "%s: oo %3d | rd %4d | wr %4d | f %4d\n", | 256 | pr_debug("xen-blkback (%s): oo %3d | rd %4d | wr %4d | f %4d\n", |
257 | current->comm, blkif->st_oo_req, | 257 | current->comm, blkif->st_oo_req, |
258 | blkif->st_rd_req, blkif->st_wr_req, blkif->st_f_req); | 258 | blkif->st_rd_req, blkif->st_wr_req, blkif->st_f_req); |
259 | blkif->st_print = jiffies + msecs_to_jiffies(10 * 1000); | 259 | blkif->st_print = jiffies + msecs_to_jiffies(10 * 1000); |
260 | blkif->st_rd_req = 0; | 260 | blkif->st_rd_req = 0; |
261 | blkif->st_wr_req = 0; | 261 | blkif->st_wr_req = 0; |
@@ -270,7 +270,7 @@ int xen_blkif_schedule(void *arg) | |||
270 | xen_blkif_get(blkif); | 270 | xen_blkif_get(blkif); |
271 | 271 | ||
272 | if (debug_lvl) | 272 | if (debug_lvl) |
273 | printk(KERN_DEBUG "%s: started\n", current->comm); | 273 | pr_debug("xen-blkback: %s: started\n", current->comm); |
274 | 274 | ||
275 | while (!kthread_should_stop()) { | 275 | while (!kthread_should_stop()) { |
276 | if (try_to_freeze()) | 276 | if (try_to_freeze()) |
@@ -299,7 +299,7 @@ int xen_blkif_schedule(void *arg) | |||
299 | if (log_stats) | 299 | if (log_stats) |
300 | print_stats(blkif); | 300 | print_stats(blkif); |
301 | if (debug_lvl) | 301 | if (debug_lvl) |
302 | printk(KERN_DEBUG "%s: exiting\n", current->comm); | 302 | pr_debug("xen-blkback: %s: exiting\n", current->comm); |
303 | 303 | ||
304 | blkif->xenblkd = NULL; | 304 | blkif->xenblkd = NULL; |
305 | xen_blkif_put(blkif); | 305 | xen_blkif_put(blkif); |
@@ -343,8 +343,8 @@ static void xen_blkbk_unmap(struct pending_req *req) | |||
343 | ret = m2p_remove_override( | 343 | ret = m2p_remove_override( |
344 | virt_to_page(unmap[i].host_addr), false); | 344 | virt_to_page(unmap[i].host_addr), false); |
345 | if (ret) { | 345 | if (ret) { |
346 | printk(KERN_ALERT "Failed to remove M2P override for %lx\n", | 346 | pr_alert("xen-blkback: Failed to remove M2P override for %lx\n", |
347 | (unsigned long)unmap[i].host_addr); | 347 | (unsigned long)unmap[i].host_addr); |
348 | continue; | 348 | continue; |
349 | } | 349 | } |
350 | } | 350 | } |
@@ -385,7 +385,7 @@ static int xen_blkbk_map(struct blkif_request *req, | |||
385 | */ | 385 | */ |
386 | for (i = 0; i < nseg; i++) { | 386 | for (i = 0; i < nseg; i++) { |
387 | if (unlikely(map[i].status != 0)) { | 387 | if (unlikely(map[i].status != 0)) { |
388 | DPRINTK("invalid buffer -- could not remap it\n"); | 388 | pr_debug("xen-blkback: invalid buffer -- could not remap it\n"); |
389 | map[i].handle = BLKBACK_INVALID_HANDLE; | 389 | map[i].handle = BLKBACK_INVALID_HANDLE; |
390 | ret |= 1; | 390 | ret |= 1; |
391 | } | 391 | } |
@@ -398,9 +398,8 @@ static int xen_blkbk_map(struct blkif_request *req, | |||
398 | ret = m2p_add_override(PFN_DOWN(map[i].dev_bus_addr), | 398 | ret = m2p_add_override(PFN_DOWN(map[i].dev_bus_addr), |
399 | blkbk->pending_page(pending_req, i), false); | 399 | blkbk->pending_page(pending_req, i), false); |
400 | if (ret) { | 400 | if (ret) { |
401 | printk(KERN_ALERT "Failed to install M2P override for"\ | 401 | pr_alert("xen-blkback: Failed to install M2P override for %lx (ret: %d)\n", |
402 | " %lx (ret: %d)\n", (unsigned long) | 402 | (unsigned long)map[i].dev_bus_addr, ret); |
403 | map[i].dev_bus_addr, ret); | ||
404 | /* We could switch over to GNTTABOP_copy */ | 403 | /* We could switch over to GNTTABOP_copy */ |
405 | continue; | 404 | continue; |
406 | } | 405 | } |
@@ -420,12 +419,12 @@ static void __end_block_io_op(struct pending_req *pending_req, int error) | |||
420 | /* An error fails the entire request. */ | 419 | /* An error fails the entire request. */ |
421 | if ((pending_req->operation == BLKIF_OP_FLUSH_DISKCACHE) && | 420 | if ((pending_req->operation == BLKIF_OP_FLUSH_DISKCACHE) && |
422 | (error == -EOPNOTSUPP)) { | 421 | (error == -EOPNOTSUPP)) { |
423 | DPRINTK("blkback: flush diskcache op failed, not supported\n"); | 422 | pr_debug("xen-blkback: flush diskcache op failed, not supported\n"); |
424 | xen_blkbk_flush_diskcache(XBT_NIL, pending_req->blkif->be, 0); | 423 | xen_blkbk_flush_diskcache(XBT_NIL, pending_req->blkif->be, 0); |
425 | pending_req->status = BLKIF_RSP_EOPNOTSUPP; | 424 | pending_req->status = BLKIF_RSP_EOPNOTSUPP; |
426 | } else if (error) { | 425 | } else if (error) { |
427 | DPRINTK("Buffer not up-to-date at end of operation, " | 426 | pr_debug("xen-blkback: Buffer not up-to-date at end of operation," |
428 | "error=%d\n", error); | 427 | " error=%d\n", error); |
429 | pending_req->status = BLKIF_RSP_ERROR; | 428 | pending_req->status = BLKIF_RSP_ERROR; |
430 | } | 429 | } |
431 | 430 | ||
@@ -562,7 +561,8 @@ static int dispatch_rw_block_io(struct blkif_st *blkif, | |||
562 | nseg = req->nr_segments; | 561 | nseg = req->nr_segments; |
563 | if (unlikely(nseg == 0 && operation != WRITE_FLUSH) || | 562 | if (unlikely(nseg == 0 && operation != WRITE_FLUSH) || |
564 | unlikely(nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) { | 563 | unlikely(nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) { |
565 | DPRINTK("Bad number of segments in request (%d)\n", nseg); | 564 | pr_debug("xen-blkback: Bad number of segments in request (%d)\n", |
565 | nseg); | ||
566 | /* Haven't submitted any bio's yet. */ | 566 | /* Haven't submitted any bio's yet. */ |
567 | goto fail_response; | 567 | goto fail_response; |
568 | } | 568 | } |
@@ -588,10 +588,10 @@ static int dispatch_rw_block_io(struct blkif_st *blkif, | |||
588 | } | 588 | } |
589 | 589 | ||
590 | if (vbd_translate(&preq, blkif, operation) != 0) { | 590 | if (vbd_translate(&preq, blkif, operation) != 0) { |
591 | DPRINTK("access denied: %s of [%llu,%llu] on dev=%04x\n", | 591 | pr_debug("xen-blkback: access denied: %s of [%llu,%llu] on dev=%04x\n", |
592 | operation == READ ? "read" : "write", | 592 | operation == READ ? "read" : "write", |
593 | preq.sector_number, | 593 | preq.sector_number, |
594 | preq.sector_number + preq.nr_sects, preq.dev); | 594 | preq.sector_number + preq.nr_sects, preq.dev); |
595 | goto fail_response; | 595 | goto fail_response; |
596 | } | 596 | } |
597 | 597 | ||
@@ -602,8 +602,8 @@ static int dispatch_rw_block_io(struct blkif_st *blkif, | |||
602 | for (i = 0; i < nseg; i++) { | 602 | for (i = 0; i < nseg; i++) { |
603 | if (((int)preq.sector_number|(int)seg[i].nsec) & | 603 | if (((int)preq.sector_number|(int)seg[i].nsec) & |
604 | ((bdev_logical_block_size(preq.bdev) >> 9) - 1)) { | 604 | ((bdev_logical_block_size(preq.bdev) >> 9) - 1)) { |
605 | DPRINTK("Misaligned I/O request from domain %d", | 605 | pr_debug("xen-blkback: Misaligned I/O request from domain %d", |
606 | blkif->domid); | 606 | blkif->domid); |
607 | goto fail_response; | 607 | goto fail_response; |
608 | } | 608 | } |
609 | } | 609 | } |
@@ -759,7 +759,7 @@ static int __init xen_blkif_init(void) | |||
759 | 759 | ||
760 | blkbk = kzalloc(sizeof(struct xen_blkbk), GFP_KERNEL); | 760 | blkbk = kzalloc(sizeof(struct xen_blkbk), GFP_KERNEL); |
761 | if (!blkbk) { | 761 | if (!blkbk) { |
762 | printk(KERN_ALERT "%s: out of memory!\n", __func__); | 762 | pr_alert("xen-blkback: %s: out of memory!\n", __func__); |
763 | return -ENOMEM; | 763 | return -ENOMEM; |
764 | } | 764 | } |
765 | 765 | ||
@@ -807,7 +807,7 @@ static int __init xen_blkif_init(void) | |||
807 | return 0; | 807 | return 0; |
808 | 808 | ||
809 | out_of_memory: | 809 | out_of_memory: |
810 | printk(KERN_ERR "%s: out of memory\n", __func__); | 810 | pr_alert("xen-blkback: %s: out of memory\n", __func__); |
811 | failed_init: | 811 | failed_init: |
812 | kfree(blkbk->pending_reqs); | 812 | kfree(blkbk->pending_reqs); |
813 | kfree(blkbk->pending_grant_handles); | 813 | kfree(blkbk->pending_grant_handles); |