diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 16:43:12 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-05-12 16:43:12 -0400 |
commit | 22b20f2dffd09edd66127f2022c26d0039bad88e (patch) | |
tree | 08c235963147f9866e274abd7ed46c36fae8f179 /drivers/block/xen-blkback/blkback.c | |
parent | 1afbd730a33c6e4ca780a70351e8929dd4c40636 (diff) |
xen/blkback: Use the DRV_PFX in the pr_.. macros.
To make it easier to read.
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 | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c index 5c9568e39eab..09fe528dd088 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 | pr_info("xen-blkback: VBD Resize: Domid: %d, Device: (%d, %d)\n", | 199 | pr_info(DRV_PFX "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 | pr_info("xen-blkback: VBD Resize: new size %llu\n", new_size); | 201 | pr_info(DRV_PFX "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 | pr_warn("xen-blkback: Error starting transaction"); | 206 | pr_warn(DRV_PFX "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 | pr_warn("xen-blkback: Error writing new size"); | 212 | pr_warn(DRV_PFX "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 | pr_warn("xen-blkback: Error writing the state"); | 222 | pr_warn(DRV_PFX "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 | pr_warn("xen-blkback: Error ending transaction"); | 230 | pr_warn(DRV_PFX "Error ending transaction"); |
231 | abort: | 231 | abort: |
232 | xenbus_transaction_end(xbt, 1); | 232 | xenbus_transaction_end(xbt, 1); |
233 | } | 233 | } |
@@ -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 | pr_debug("xen-blkback: %s: started\n", current->comm); | 273 | pr_debug(DRV_PFX "%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 | pr_debug("xen-blkback: %s: exiting\n", current->comm); | 302 | pr_debug(DRV_PFX "%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,7 +343,7 @@ 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 | pr_alert("xen-blkback: Failed to remove M2P override for %lx\n", | 346 | pr_alert(DRV_PFX "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 | } |
@@ -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 | pr_debug("xen-blkback: invalid buffer -- could not remap it\n"); | 388 | pr_debug(DRV_PFX "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,7 +398,7 @@ 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 | pr_alert("xen-blkback: Failed to install M2P override for %lx (ret: %d)\n", | 401 | pr_alert(DRV_PFX "Failed to install M2P override for %lx (ret: %d)\n", |
402 | (unsigned long)map[i].dev_bus_addr, ret); | 402 | (unsigned long)map[i].dev_bus_addr, ret); |
403 | /* We could switch over to GNTTABOP_copy */ | 403 | /* We could switch over to GNTTABOP_copy */ |
404 | continue; | 404 | continue; |
@@ -419,11 +419,11 @@ static void __end_block_io_op(struct pending_req *pending_req, int error) | |||
419 | /* An error fails the entire request. */ | 419 | /* An error fails the entire request. */ |
420 | if ((pending_req->operation == BLKIF_OP_FLUSH_DISKCACHE) && | 420 | if ((pending_req->operation == BLKIF_OP_FLUSH_DISKCACHE) && |
421 | (error == -EOPNOTSUPP)) { | 421 | (error == -EOPNOTSUPP)) { |
422 | pr_debug("xen-blkback: flush diskcache op failed, not supported\n"); | 422 | pr_debug(DRV_PFX "flush diskcache op failed, not supported\n"); |
423 | xen_blkbk_flush_diskcache(XBT_NIL, pending_req->blkif->be, 0); | 423 | xen_blkbk_flush_diskcache(XBT_NIL, pending_req->blkif->be, 0); |
424 | pending_req->status = BLKIF_RSP_EOPNOTSUPP; | 424 | pending_req->status = BLKIF_RSP_EOPNOTSUPP; |
425 | } else if (error) { | 425 | } else if (error) { |
426 | pr_debug("xen-blkback: Buffer not up-to-date at end of operation," | 426 | pr_debug(DRV_PFX "Buffer not up-to-date at end of operation," |
427 | " error=%d\n", error); | 427 | " error=%d\n", error); |
428 | pending_req->status = BLKIF_RSP_ERROR; | 428 | pending_req->status = BLKIF_RSP_ERROR; |
429 | } | 429 | } |
@@ -561,7 +561,7 @@ static int dispatch_rw_block_io(struct blkif_st *blkif, | |||
561 | nseg = req->nr_segments; | 561 | nseg = req->nr_segments; |
562 | if (unlikely(nseg == 0 && operation != WRITE_FLUSH) || | 562 | if (unlikely(nseg == 0 && operation != WRITE_FLUSH) || |
563 | unlikely(nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) { | 563 | unlikely(nseg > BLKIF_MAX_SEGMENTS_PER_REQUEST)) { |
564 | pr_debug("xen-blkback: Bad number of segments in request (%d)\n", | 564 | pr_debug(DRV_PFX "Bad number of segments in request (%d)\n", |
565 | nseg); | 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; |
@@ -588,7 +588,7 @@ 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 | pr_debug("xen-blkback: access denied: %s of [%llu,%llu] on dev=%04x\n", | 591 | pr_debug(DRV_PFX "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); |
@@ -602,7 +602,7 @@ 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 | pr_debug("xen-blkback: Misaligned I/O request from domain %d", | 605 | pr_debug(DRV_PFX "Misaligned I/O request from domain %d", |
606 | blkif->domid); | 606 | blkif->domid); |
607 | goto fail_response; | 607 | goto fail_response; |
608 | } | 608 | } |
@@ -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 | pr_alert("xen-blkback: %s: out of memory!\n", __func__); | 762 | pr_alert(DRV_PFX "%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 | pr_alert("xen-blkback: %s: out of memory\n", __func__); | 810 | pr_alert(DRV_PFX "%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); |