drbd: Rename struct drbd_epoch_entry to struct drbd_peer_request
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index bc5351d..e061aca 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -189,7 +189,7 @@
static void reclaim_net_ee(struct drbd_conf *mdev, struct list_head *to_be_freed)
{
- struct drbd_epoch_entry *e;
+ struct drbd_peer_request *e;
struct list_head *le, *tle;
/* The EEs are always appended to the end of the list. Since
@@ -198,7 +198,7 @@
stop to examine the list... */
list_for_each_safe(le, tle, &mdev->net_ee) {
- e = list_entry(le, struct drbd_epoch_entry, w.list);
+ e = list_entry(le, struct drbd_peer_request, w.list);
if (drbd_ee_has_active_page(e))
break;
list_move(le, to_be_freed);
@@ -208,7 +208,7 @@
static void drbd_kick_lo_and_reclaim_net(struct drbd_conf *mdev)
{
LIST_HEAD(reclaimed);
- struct drbd_epoch_entry *e, *t;
+ struct drbd_peer_request *e, *t;
spin_lock_irq(&mdev->tconn->req_lock);
reclaim_net_ee(mdev, &reclaimed);
@@ -309,13 +309,11 @@
drbd_wait_ee_list_empty()
*/
-struct drbd_epoch_entry *drbd_alloc_ee(struct drbd_conf *mdev,
- u64 id,
- sector_t sector,
- unsigned int data_size,
- gfp_t gfp_mask) __must_hold(local)
+struct drbd_peer_request *
+drbd_alloc_ee(struct drbd_conf *mdev, u64 id, sector_t sector,
+ unsigned int data_size, gfp_t gfp_mask) __must_hold(local)
{
- struct drbd_epoch_entry *e;
+ struct drbd_peer_request *e;
struct page *page;
unsigned nr_pages = (data_size + PAGE_SIZE -1) >> PAGE_SHIFT;
@@ -357,7 +355,8 @@
return NULL;
}
-void drbd_free_some_ee(struct drbd_conf *mdev, struct drbd_epoch_entry *e, int is_net)
+void drbd_free_some_ee(struct drbd_conf *mdev, struct drbd_peer_request *e,
+ int is_net)
{
if (e->flags & EE_HAS_DIGEST)
kfree(e->digest);
@@ -370,7 +369,7 @@
int drbd_release_ee(struct drbd_conf *mdev, struct list_head *list)
{
LIST_HEAD(work_list);
- struct drbd_epoch_entry *e, *t;
+ struct drbd_peer_request *e, *t;
int count = 0;
int is_net = list == &mdev->net_ee;
@@ -399,7 +398,7 @@
{
LIST_HEAD(work_list);
LIST_HEAD(reclaimed);
- struct drbd_epoch_entry *e, *t;
+ struct drbd_peer_request *e, *t;
int ok = (mdev->state.conn >= C_WF_REPORT_PARAMS);
spin_lock_irq(&mdev->tconn->req_lock);
@@ -1100,8 +1099,8 @@
* on certain Xen deployments.
*/
/* TODO allocate from our own bio_set. */
-int drbd_submit_ee(struct drbd_conf *mdev, struct drbd_epoch_entry *e,
- const unsigned rw, const int fault_type)
+int drbd_submit_ee(struct drbd_conf *mdev, struct drbd_peer_request *e,
+ const unsigned rw, const int fault_type)
{
struct bio *bios = NULL;
struct bio *bio;
@@ -1176,7 +1175,7 @@
}
static void drbd_remove_epoch_entry_interval(struct drbd_conf *mdev,
- struct drbd_epoch_entry *e)
+ struct drbd_peer_request *e)
{
struct drbd_interval *i = &e->i;
@@ -1262,11 +1261,12 @@
/* used from receive_RSDataReply (recv_resync_read)
* and from receive_Data */
-static struct drbd_epoch_entry *
-read_in_block(struct drbd_conf *mdev, u64 id, sector_t sector, int data_size) __must_hold(local)
+static struct drbd_peer_request *
+read_in_block(struct drbd_conf *mdev, u64 id, sector_t sector,
+ int data_size) __must_hold(local)
{
const sector_t capacity = drbd_get_capacity(mdev->this_bdev);
- struct drbd_epoch_entry *e;
+ struct drbd_peer_request *e;
struct page *page;
int dgs, ds, rr;
void *dig_in = mdev->tconn->int_dig_in;
@@ -1445,7 +1445,7 @@
* drbd_process_done_ee() by asender only */
static int e_end_resync_block(struct drbd_conf *mdev, struct drbd_work *w, int unused)
{
- struct drbd_epoch_entry *e = (struct drbd_epoch_entry *)w;
+ struct drbd_peer_request *e = (struct drbd_peer_request *)w;
sector_t sector = e->i.sector;
int ok;
@@ -1467,7 +1467,7 @@
static int recv_resync_read(struct drbd_conf *mdev, sector_t sector, int data_size) __releases(local)
{
- struct drbd_epoch_entry *e;
+ struct drbd_peer_request *e;
e = read_in_block(mdev, ID_SYNCER, sector, data_size);
if (!e)
@@ -1582,7 +1582,7 @@
*/
static int e_end_block(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
{
- struct drbd_epoch_entry *e = (struct drbd_epoch_entry *)w;
+ struct drbd_peer_request *e = (struct drbd_peer_request *)w;
sector_t sector = e->i.sector;
int ok = 1, pcmd;
@@ -1619,7 +1619,7 @@
static int e_send_discard_ack(struct drbd_conf *mdev, struct drbd_work *w, int unused)
{
- struct drbd_epoch_entry *e = (struct drbd_epoch_entry *)w;
+ struct drbd_peer_request *e = (struct drbd_peer_request *)w;
int ok = 1;
D_ASSERT(mdev->tconn->net_conf->wire_protocol == DRBD_PROT_C);
@@ -1731,7 +1731,7 @@
unsigned int data_size)
{
sector_t sector;
- struct drbd_epoch_entry *e;
+ struct drbd_peer_request *e;
struct p_data *p = &mdev->tconn->data.rbuf.data;
int rw = WRITE;
u32 dp_flags;
@@ -2015,7 +2015,7 @@
{
sector_t sector;
const sector_t capacity = drbd_get_capacity(mdev->this_bdev);
- struct drbd_epoch_entry *e;
+ struct drbd_peer_request *e;
struct digest_info *di = NULL;
int size, verb;
unsigned int fault_type;