Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 242871
b: refs/heads/master
c: 02851e9
h: refs/heads/master
i:
  242869: 6043d34
  242867: 2ad0021
  242863: 4c74133
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Mar 10, 2011
1 parent a7686f0 commit e1ae780
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 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: 84e7c0f7d123d64d97e1f789ad2f23a72fe8981f
refs/heads/master: 02851e9f00d78dbc8ded0aacbf9bf3b631d627b3
14 changes: 10 additions & 4 deletions trunk/drivers/block/drbd/drbd_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,9 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
if (os.disk < D_UP_TO_DATE && os.conn >= C_SYNC_SOURCE && ns.conn == C_CONNECTED)
drbd_send_state(mdev);

if (os.conn > C_CONNECTED && ns.conn == C_CONNECTED)
drbd_queue_bitmap_io(mdev, &drbd_bm_write, NULL, "write from resync_finished");

/* free tl_hash if we Got thawed and are C_STANDALONE */
if (ns.conn == C_STANDALONE && !is_susp(ns) && mdev->tl_hash)
drbd_free_tl_hash(mdev);
Expand Down Expand Up @@ -3860,13 +3863,16 @@ int drbd_bmio_clear_n_write(struct drbd_conf *mdev)
static int w_bitmap_io(struct drbd_conf *mdev, struct drbd_work *w, int unused)
{
struct bm_io_work *work = container_of(w, struct bm_io_work, w);
int rv;
int rv = -EIO;

D_ASSERT(atomic_read(&mdev->ap_bio_cnt) == 0);

drbd_bm_lock(mdev, work->why);
rv = work->io_fn(mdev);
drbd_bm_unlock(mdev);
if (get_ldev(mdev)) {
drbd_bm_lock(mdev, work->why);
rv = work->io_fn(mdev);
drbd_bm_unlock(mdev);
put_ldev(mdev);
}

clear_bit(BITMAP_IO, &mdev->flags);
smp_mb__after_clear_bit();
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/block/drbd/drbd_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,6 @@ int drbd_resync_finished(struct drbd_conf *mdev)

drbd_md_sync(mdev);

dev_info(DEV, "Writing changed bitmap pages\n");
drbd_queue_bitmap_io(mdev, &drbd_bm_write, NULL, "write from resync_finished");

if (khelper_cmd)
drbd_khelper(mdev, khelper_cmd);

Expand Down

0 comments on commit e1ae780

Please sign in to comment.