Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213093
b: refs/heads/master
c: 7e602c0
h: refs/heads/master
i:
  213091: 92c08a5
v: v3
  • Loading branch information
Philipp Reisner committed Oct 14, 2010
1 parent 49d15f8 commit e775845
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 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: 504c6d1b44bc6e694bdba8d9a2a4e046275b5e2b
refs/heads/master: 7e602c0aaf3e686c36cc742119f0f53f42e9befe
2 changes: 1 addition & 1 deletion trunk/drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ struct drbd_tl_epoch {
struct list_head requests; /* requests before */
struct drbd_tl_epoch *next; /* pointer to the next barrier */
unsigned int br_number; /* the barriers identifier. */
int n_req; /* number of requests attached before this barrier */
int n_writes; /* number of requests attached before this barrier */
};

struct drbd_request;
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static int tl_init(struct drbd_conf *mdev)
INIT_LIST_HEAD(&b->w.list);
b->next = NULL;
b->br_number = 4711;
b->n_req = 0;
b->n_writes = 0;
b->w.cb = NULL; /* if this is != NULL, we need to dec_ap_pending in tl_clear */

mdev->oldest_tle = b;
Expand Down Expand Up @@ -240,7 +240,7 @@ void _tl_add_barrier(struct drbd_conf *mdev, struct drbd_tl_epoch *new)
INIT_LIST_HEAD(&new->w.list);
new->w.cb = NULL; /* if this is != NULL, we need to dec_ap_pending in tl_clear */
new->next = NULL;
new->n_req = 0;
new->n_writes = 0;

newest_before = mdev->newest_tle;
/* never send a barrier number == 0, because that is special-cased
Expand Down Expand Up @@ -284,9 +284,9 @@ void tl_release(struct drbd_conf *mdev, unsigned int barrier_nr,
barrier_nr, b->br_number);
goto bail;
}
if (b->n_req != set_size) {
dev_err(DEV, "BAD! BarrierAck #%u received with n_req=%u, expected n_req=%u!\n",
barrier_nr, set_size, b->n_req);
if (b->n_writes != set_size) {
dev_err(DEV, "BAD! BarrierAck #%u received with n_writes=%u, expected n_writes=%u!\n",
barrier_nr, set_size, b->n_writes);
goto bail;
}

Expand Down Expand Up @@ -378,7 +378,7 @@ void tl_clear(struct drbd_conf *mdev)
INIT_LIST_HEAD(&b->w.list);
b->w.cb = NULL;
b->br_number = new_initial_bnr;
b->n_req = 0;
b->n_writes = 0;

mdev->oldest_tle = b;
break;
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/block/drbd/drbd_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ void __req_mod(struct drbd_request *req, enum drbd_req_event what,
&mdev->newest_tle->requests);

/* increment size of current epoch */
mdev->newest_tle->n_req++;
mdev->newest_tle->n_writes++;

/* queue work item to send data */
D_ASSERT(req->rq_state & RQ_NET_PENDING);
Expand All @@ -530,7 +530,7 @@ void __req_mod(struct drbd_request *req, enum drbd_req_event what,
drbd_queue_work(&mdev->data.work, &req->w);

/* close the epoch, in case it outgrew the limit */
if (mdev->newest_tle->n_req >= mdev->net_conf->max_epoch_size)
if (mdev->newest_tle->n_writes >= mdev->net_conf->max_epoch_size)
queue_barrier(mdev);

break;
Expand Down

0 comments on commit e775845

Please sign in to comment.