Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d24517d793f21edab1a411da95f2c45cb88a84aa
Commit:     d24517d793f21edab1a411da95f2c45cb88a84aa
Parent:     f5ff8422bbdd59f8c1f699df248e1b7a11073027
Author:     NeilBrown <[EMAIL PROTECTED]>
AuthorDate: Thu Sep 27 12:46:11 2007 +0200
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 09:25:57 2007 +0200

    Remove flush_dry_bio_endio
    
    The entire function of flush_dry_bio_endio is to undo the effects
    of bio_endio (when called on a barrier request).  So remove the
    function and the call to bio_endio.
    
    This allows us to remove "bi_size" from "struct request_queue".
    
    Signed-off-by: Neil Brown <[EMAIL PROTECTED]>
    
    ### Diffstat output
     ./block/ll_rw_blk.c      |   39 ++-------------------------------------
     ./include/linux/blkdev.h |    1 -
     2 files changed, 2 insertions(+), 38 deletions(-)
    
    diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 block/ll_rw_blk.c      |   39 ++-------------------------------------
 include/linux/blkdev.h |    1 -
 2 files changed, 2 insertions(+), 38 deletions(-)

diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 3b2eff4..dfe0948 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -431,7 +431,6 @@ static void queue_flush(struct request_queue *q, unsigned 
which)
 static inline struct request *start_ordered(struct request_queue *q,
                                            struct request *rq)
 {
-       q->bi_size = 0;
        q->orderr = 0;
        q->ordered = q->next_ordered;
        q->ordseq |= QUEUE_ORDSEQ_STARTED;
@@ -528,55 +527,21 @@ int blk_do_ordered(struct request_queue *q, struct 
request **rqp)
        return 1;
 }
 
-static int flush_dry_bio_endio(struct bio *bio, unsigned int bytes, int error)
-{
-       struct request_queue *q = bio->bi_private;
-
-       /*
-        * This is dry run, restore bio_sector and size.  We'll finish
-        * this request again with the original bi_end_io after an
-        * error occurs or post flush is complete.
-        */
-       q->bi_size += bytes;
-
-       if (bio->bi_size)
-               return 1;
-
-       /* Reset bio */
-       set_bit(BIO_UPTODATE, &bio->bi_flags);
-       bio->bi_size = q->bi_size;
-       bio->bi_sector -= (q->bi_size >> 9);
-       q->bi_size = 0;
-
-       return 0;
-}
-
 static int ordered_bio_endio(struct request *rq, struct bio *bio,
                             unsigned int nbytes, int error)
 {
        struct request_queue *q = rq->q;
-       bio_end_io_t *endio;
-       void *private;
 
        if (&q->bar_rq != rq)
                return 0;
 
        /*
-        * Okay, this is the barrier request in progress, dry finish it.
+        * Okay, this is the barrier request in progress, just
+        * record the error;
         */
        if (error && !q->orderr)
                q->orderr = error;
 
-       endio = bio->bi_end_io;
-       private = bio->bi_private;
-       bio->bi_end_io = flush_dry_bio_endio;
-       bio->bi_private = q;
-
-       bio_endio(bio, nbytes, error);
-
-       bio->bi_end_io = endio;
-       bio->bi_private = private;
-
        return 1;
 }
 
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index a0a9981..95be0ac 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -471,7 +471,6 @@ struct request_queue
        int                     orderr, ordcolor;
        struct request          pre_flush_rq, bar_rq, post_flush_rq;
        struct request          *orig_bar_rq;
-       unsigned int            bi_size;
 
        struct mutex            sysfs_lock;
 
-
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