Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f530f036378421fb0b59bb829a8097a50bca79e2
Commit:     f530f036378421fb0b59bb829a8097a50bca79e2
Parent:     b2aec24ea4c5836f9b3cbc7dca51f0ae639865ed
Author:     Kiyoshi Ueda <[EMAIL PROTECTED]>
AuthorDate: Tue Dec 11 17:47:36 2007 -0500
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 10:36:46 2008 +0100

    blk_end_request: changing xen-blkfront (take 4)
    
    This patch converts xen-blkfront to use blk_end_request interfaces.
    Related 'uptodate' arguments are converted to 'error'.
    
    Cc: Jeremy Fitzhardinge <[EMAIL PROTECTED]>
    Signed-off-by: Kiyoshi Ueda <[EMAIL PROTECTED]>
    Signed-off-by: Jun'ichi Nomura <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 drivers/block/xen-blkfront.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 2bdebcb..8afce67 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -452,7 +452,7 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)
        RING_IDX i, rp;
        unsigned long flags;
        struct blkfront_info *info = (struct blkfront_info *)dev_id;
-       int uptodate;
+       int error;
 
        spin_lock_irqsave(&blkif_io_lock, flags);
 
@@ -477,13 +477,13 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)
 
                add_id_to_freelist(info, id);
 
-               uptodate = (bret->status == BLKIF_RSP_OKAY);
+               error = (bret->status == BLKIF_RSP_OKAY) ? 0 : -EIO;
                switch (bret->operation) {
                case BLKIF_OP_WRITE_BARRIER:
                        if (unlikely(bret->status == BLKIF_RSP_EOPNOTSUPP)) {
                                printk(KERN_WARNING "blkfront: %s: write 
barrier op failed\n",
                                       info->gd->disk_name);
-                               uptodate = -EOPNOTSUPP;
+                               error = -EOPNOTSUPP;
                                info->feature_barrier = 0;
                                xlvbd_barrier(info);
                        }
@@ -494,10 +494,8 @@ static irqreturn_t blkif_interrupt(int irq, void *dev_id)
                                dev_dbg(&info->xbdev->dev, "Bad return from 
blkdev data "
                                        "request: %x\n", bret->status);
 
-                       ret = end_that_request_first(req, uptodate,
-                               req->hard_nr_sectors);
+                       ret = __blk_end_request(req, error, blk_rq_bytes(req));
                        BUG_ON(ret);
-                       end_that_request_last(req, uptodate);
                        break;
                default:
                        BUG();
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to