drbd: renamed drbd_tl_epoch.n_req to drbd_tl_epoch.n_writes
authorPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 27 May 2010 12:49:27 +0000 (14:49 +0200)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 14 Oct 2010 12:23:45 +0000 (14:23 +0200)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_main.c
drivers/block/drbd/drbd_req.c

index 352441b0f92f860ee3e5824dcb62e81d9864b3e5..11b7c6f84cd36db9defdc9e1081f4ef25587ea20 100644 (file)
@@ -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;
index fa650dd85b9099073f1d3179aff32ed987a2541d..a9bc6bc62400da7fa43e3ef8c8773fc91bc67206 100644 (file)
@@ -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;
@@ -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
@@ -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;
        }
 
@@ -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;
index f761d98a4e90320998bd54099ea8c4caa56154ac..976d7941f71e85c763d27fa6e64c7967ebd1e005 100644 (file)
@@ -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);
@@ -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;