Commit ba2541f2 authored by Christoph Hellwig's avatar Christoph Hellwig

[PATCH] rename end_request in floppy() and raid1

In preparation of getting rid of the LOCAL_END_REQUEST mess.
parent 4b28bcb3
......@@ -2293,7 +2293,7 @@ static int do_format(kdev_t device, struct format_descr *tmp_format_req)
* =============================
*/
static inline void end_request(struct request *req, int uptodate)
static void floppy_end_request(struct request *req, int uptodate)
{
if (end_that_request_first(req, uptodate, current_count_sectors))
return;
......@@ -2334,7 +2334,7 @@ static void request_done(int uptodate)
/* unlock chained buffers */
spin_lock_irqsave(q->queue_lock, flags);
end_request(req, 1);
floppy_end_request(req, 1);
spin_unlock_irqrestore(q->queue_lock, flags);
} else {
if (rq_data_dir(req) == WRITE) {
......@@ -2348,7 +2348,7 @@ static void request_done(int uptodate)
DRWE->last_error_generation = DRS->generation;
}
spin_lock_irqsave(q->queue_lock, flags);
end_request(req, 0);
floppy_end_request(req, 0);
spin_unlock_irqrestore(q->queue_lock, flags);
}
}
......
......@@ -2348,7 +2348,7 @@ static int do_format(kdev_t device, struct format_descr *tmp_format_req)
* =============================
*/
static inline void end_request(struct request *req, int uptodate)
static void floppy_end_request(struct request *req, int uptodate)
{
if (end_that_request_first(req, uptodate, current_count_sectors))
return;
......@@ -2389,7 +2389,7 @@ static void request_done(int uptodate)
/* unlock chained buffers */
spin_lock_irqsave(q->queue_lock, flags);
end_request(req, 1);
floppy_end_request(req, 1);
spin_unlock_irqrestore(q->queue_lock, flags);
} else {
if (rq_data_dir(req) == WRITE) {
......@@ -2403,7 +2403,7 @@ static void request_done(int uptodate)
DRWE->last_error_generation = DRS->generation;
}
spin_lock_irqsave(q->queue_lock, flags);
end_request(req, 0);
floppy_end_request(req, 0);
spin_unlock_irqrestore(q->queue_lock, flags);
}
}
......
......@@ -258,7 +258,7 @@ static inline void update_head_pos(int disk, r1bio_t *r1_bio)
r1_bio->sector + (r1_bio->master_bio->bi_size >> 9);
}
static int end_request(struct bio *bio, unsigned int bytes_done, int error)
static int raid1_end_request(struct bio *bio, unsigned int bytes_done, int error)
{
int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private);
......@@ -496,7 +496,7 @@ static int make_request(request_queue_t *q, struct bio * bio)
read_bio->bi_sector = r1_bio->sector + mirror->rdev->data_offset;
read_bio->bi_bdev = mirror->rdev->bdev;
read_bio->bi_end_io = end_request;
read_bio->bi_end_io = raid1_end_request;
read_bio->bi_rw = r1_bio->cmd;
read_bio->bi_private = r1_bio;
......@@ -531,7 +531,7 @@ static int make_request(request_queue_t *q, struct bio * bio)
mbio->bi_sector = r1_bio->sector + conf->mirrors[i].rdev->data_offset;
mbio->bi_bdev = conf->mirrors[i].rdev->bdev;
mbio->bi_end_io = end_request;
mbio->bi_end_io = raid1_end_request;
mbio->bi_rw = r1_bio->cmd;
mbio->bi_private = r1_bio;
......@@ -551,11 +551,11 @@ static int make_request(request_queue_t *q, struct bio * bio)
/*
* We have to be a bit careful about the semaphore above, thats
* why we start the requests separately. Since generic_make_request()
* can sleep, this is the safer solution. Imagine, end_request
* can sleep, this is the safer solution. Imagine, raid1_end_request
* decreasing the semaphore before we could have set it up ...
* We could play tricks with the semaphore (presetting it and
* correcting at the end if sum_bios is not 'n' but we have to
* do end_request by hand if all requests finish until we had a
* do raid1_end_request by hand if all requests finish until we had a
* chance to set up the semaphore correctly ... lots of races).
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment