aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2010-05-27 08:49:27 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-10-14 08:23:45 -0400
commit7e602c0aaf3e686c36cc742119f0f53f42e9befe (patch)
tree788ffe2a83d907cbd83b650997775eeac2bc6b1b /drivers/block
parent504c6d1b44bc6e694bdba8d9a2a4e046275b5e2b (diff)
drbd: renamed drbd_tl_epoch.n_req to drbd_tl_epoch.n_writes
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_int.h2
-rw-r--r--drivers/block/drbd/drbd_main.c12
-rw-r--r--drivers/block/drbd/drbd_req.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 352441b0f92f..11b7c6f84cd3 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -697,7 +697,7 @@ struct drbd_tl_epoch {
697 struct list_head requests; /* requests before */ 697 struct list_head requests; /* requests before */
698 struct drbd_tl_epoch *next; /* pointer to the next barrier */ 698 struct drbd_tl_epoch *next; /* pointer to the next barrier */
699 unsigned int br_number; /* the barriers identifier. */ 699 unsigned int br_number; /* the barriers identifier. */
700 int n_req; /* number of requests attached before this barrier */ 700 int n_writes; /* number of requests attached before this barrier */
701}; 701};
702 702
703struct drbd_request; 703struct drbd_request;
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index fa650dd85b90..a9bc6bc62400 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -199,7 +199,7 @@ static int tl_init(struct drbd_conf *mdev)
199 INIT_LIST_HEAD(&b->w.list); 199 INIT_LIST_HEAD(&b->w.list);
200 b->next = NULL; 200 b->next = NULL;
201 b->br_number = 4711; 201 b->br_number = 4711;
202 b->n_req = 0; 202 b->n_writes = 0;
203 b->w.cb = NULL; /* if this is != NULL, we need to dec_ap_pending in tl_clear */ 203 b->w.cb = NULL; /* if this is != NULL, we need to dec_ap_pending in tl_clear */
204 204
205 mdev->oldest_tle = b; 205 mdev->oldest_tle = b;
@@ -240,7 +240,7 @@ void _tl_add_barrier(struct drbd_conf *mdev, struct drbd_tl_epoch *new)
240 INIT_LIST_HEAD(&new->w.list); 240 INIT_LIST_HEAD(&new->w.list);
241 new->w.cb = NULL; /* if this is != NULL, we need to dec_ap_pending in tl_clear */ 241 new->w.cb = NULL; /* if this is != NULL, we need to dec_ap_pending in tl_clear */
242 new->next = NULL; 242 new->next = NULL;
243 new->n_req = 0; 243 new->n_writes = 0;
244 244
245 newest_before = mdev->newest_tle; 245 newest_before = mdev->newest_tle;
246 /* never send a barrier number == 0, because that is special-cased 246 /* never send a barrier number == 0, because that is special-cased
@@ -284,9 +284,9 @@ void tl_release(struct drbd_conf *mdev, unsigned int barrier_nr,
284 barrier_nr, b->br_number); 284 barrier_nr, b->br_number);
285 goto bail; 285 goto bail;
286 } 286 }
287 if (b->n_req != set_size) { 287 if (b->n_writes != set_size) {
288 dev_err(DEV, "BAD! BarrierAck #%u received with n_req=%u, expected n_req=%u!\n", 288 dev_err(DEV, "BAD! BarrierAck #%u received with n_writes=%u, expected n_writes=%u!\n",
289 barrier_nr, set_size, b->n_req); 289 barrier_nr, set_size, b->n_writes);
290 goto bail; 290 goto bail;
291 } 291 }
292 292
@@ -378,7 +378,7 @@ void tl_clear(struct drbd_conf *mdev)
378 INIT_LIST_HEAD(&b->w.list); 378 INIT_LIST_HEAD(&b->w.list);
379 b->w.cb = NULL; 379 b->w.cb = NULL;
380 b->br_number = new_initial_bnr; 380 b->br_number = new_initial_bnr;
381 b->n_req = 0; 381 b->n_writes = 0;
382 382
383 mdev->oldest_tle = b; 383 mdev->oldest_tle = b;
384 break; 384 break;
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index f761d98a4e90..976d7941f71e 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -521,7 +521,7 @@ void __req_mod(struct drbd_request *req, enum drbd_req_event what,
521 &mdev->newest_tle->requests); 521 &mdev->newest_tle->requests);
522 522
523 /* increment size of current epoch */ 523 /* increment size of current epoch */
524 mdev->newest_tle->n_req++; 524 mdev->newest_tle->n_writes++;
525 525
526 /* queue work item to send data */ 526 /* queue work item to send data */
527 D_ASSERT(req->rq_state & RQ_NET_PENDING); 527 D_ASSERT(req->rq_state & RQ_NET_PENDING);
@@ -530,7 +530,7 @@ void __req_mod(struct drbd_request *req, enum drbd_req_event what,
530 drbd_queue_work(&mdev->data.work, &req->w); 530 drbd_queue_work(&mdev->data.work, &req->w);
531 531
532 /* close the epoch, in case it outgrew the limit */ 532 /* close the epoch, in case it outgrew the limit */
533 if (mdev->newest_tle->n_req >= mdev->net_conf->max_epoch_size) 533 if (mdev->newest_tle->n_writes >= mdev->net_conf->max_epoch_size)
534 queue_barrier(mdev); 534 queue_barrier(mdev);
535 535
536 break; 536 break;