Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242829
b: refs/heads/master
c: aeda1cd
h: refs/heads/master
i:
  242827: 67093c4
v: v3
  • Loading branch information
Philipp Reisner committed Mar 10, 2011
1 parent 7b26ca7 commit ad0ba70
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f91ab6282df251d28aa4ad1bd85194ebe0a0115b
refs/heads/master: aeda1cd6a58009ef21b6d9c09b1a3ded726c2d10
12 changes: 8 additions & 4 deletions trunk/drivers/block/drbd/drbd_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ static int drbd_may_do_local_read(struct drbd_conf *mdev, sector_t sector, int s
return 0 == drbd_bm_count_bits(mdev, sbnr, ebnr);
}

static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio)
static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, unsigned long start_time)
{
const int rw = bio_rw(bio);
const int size = bio->bi_size;
Expand All @@ -778,6 +778,7 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio)
bio_endio(bio, -ENOMEM);
return 0;
}
req->start_time = start_time;

local = get_ldev(mdev);
if (!local) {
Expand Down Expand Up @@ -1076,12 +1077,15 @@ int drbd_make_request_26(struct request_queue *q, struct bio *bio)
{
unsigned int s_enr, e_enr;
struct drbd_conf *mdev = (struct drbd_conf *) q->queuedata;
unsigned long start_time;

if (drbd_fail_request_early(mdev, bio_data_dir(bio) & WRITE)) {
bio_endio(bio, -EPERM);
return 0;
}

start_time = jiffies;

/*
* what we "blindly" assume:
*/
Expand All @@ -1096,7 +1100,7 @@ int drbd_make_request_26(struct request_queue *q, struct bio *bio)

if (likely(s_enr == e_enr)) {
inc_ap_bio(mdev, 1);
return drbd_make_request_common(mdev, bio);
return drbd_make_request_common(mdev, bio, start_time);
}

/* can this bio be split generically?
Expand Down Expand Up @@ -1138,10 +1142,10 @@ int drbd_make_request_26(struct request_queue *q, struct bio *bio)

D_ASSERT(e_enr == s_enr + 1);

while (drbd_make_request_common(mdev, &bp->bio1))
while (drbd_make_request_common(mdev, &bp->bio1, start_time))
inc_ap_bio(mdev, 1);

while (drbd_make_request_common(mdev, &bp->bio2))
while (drbd_make_request_common(mdev, &bp->bio2, start_time))
inc_ap_bio(mdev, 1);

dec_ap_bio(mdev);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/block/drbd/drbd_req.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ static inline struct drbd_request *drbd_req_new(struct drbd_conf *mdev,
req->epoch = 0;
req->sector = bio_src->bi_sector;
req->size = bio_src->bi_size;
req->start_time = jiffies;
INIT_HLIST_NODE(&req->colision);
INIT_LIST_HEAD(&req->tl_requests);
INIT_LIST_HEAD(&req->w.list);
Expand Down

0 comments on commit ad0ba70

Please sign in to comment.