Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346140
b: refs/heads/master
c: 1d2783d
h: refs/heads/master
v: v3
  • Loading branch information
Philipp Reisner committed Nov 8, 2012
1 parent 6229495 commit 5da2f6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 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: 4b0007c0e8def19266c767f0410ce81eb39f55c7
refs/heads/master: 1d2783d532207531ba8e3bfb016a4512dec97666
1 change: 1 addition & 0 deletions trunk/drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ struct drbd_tl_epoch {
};

struct drbd_epoch {
struct drbd_conf *mdev;
struct list_head list;
unsigned int barrier_nr;
atomic_t epoch_size; /* increased on every request added. */
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1152,11 +1152,11 @@ static enum finish_epoch drbd_may_finish_epoch(struct drbd_conf *mdev,
(test_bit(DE_HAVE_BARRIER_NUMBER, &epoch->flags) || ev & EV_CLEANUP)) {
if (!(ev & EV_CLEANUP)) {
spin_unlock(&mdev->epoch_lock);
drbd_send_b_ack(mdev, epoch->barrier_nr, epoch_size);
drbd_send_b_ack(epoch->mdev, epoch->barrier_nr, epoch_size);
spin_lock(&mdev->epoch_lock);
}
if (test_bit(DE_HAVE_BARRIER_NUMBER, &epoch->flags))
dec_unacked(mdev);
dec_unacked(epoch->mdev);

if (mdev->current_epoch != epoch) {
next_epoch = list_entry(epoch->list.next, struct drbd_epoch, list);
Expand Down Expand Up @@ -1349,6 +1349,7 @@ static int receive_Barrier(struct drbd_tconn *tconn, struct packet_info *pi)
inc_unacked(mdev);

mdev->current_epoch->barrier_nr = p->barrier;
mdev->current_epoch->mdev = mdev;
rv = drbd_may_finish_epoch(mdev, mdev->current_epoch, EV_GOT_BARRIER_NR);

/* P_BARRIER_ACK may imply that the corresponding extent is dropped from
Expand Down

0 comments on commit 5da2f6f

Please sign in to comment.