diff options
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index c3760f33d52c..9043772de400 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -337,23 +337,6 @@ bail: | |||
337 | } | 337 | } |
338 | 338 | ||
339 | 339 | ||
340 | /* In C_AHEAD mode only out_of_sync packets are sent for requests. Detach | ||
341 | * those requests from the newsest barrier when changing to an other cstate. | ||
342 | * | ||
343 | * That headless list vanishes when the last request finished its write or | ||
344 | * send out_of_sync packet. */ | ||
345 | static void tl_forget(struct drbd_conf *mdev) | ||
346 | { | ||
347 | struct drbd_tl_epoch *b; | ||
348 | |||
349 | if (test_bit(CREATE_BARRIER, &mdev->flags)) | ||
350 | return; | ||
351 | |||
352 | b = mdev->newest_tle; | ||
353 | list_del(&b->requests); | ||
354 | _tl_add_barrier(mdev, b); | ||
355 | } | ||
356 | |||
357 | /** | 340 | /** |
358 | * _tl_restart() - Walks the transfer log, and applies an action to all requests | 341 | * _tl_restart() - Walks the transfer log, and applies an action to all requests |
359 | * @mdev: DRBD device. | 342 | * @mdev: DRBD device. |
@@ -1265,14 +1248,6 @@ __drbd_set_state(struct drbd_conf *mdev, union drbd_state ns, | |||
1265 | if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED) | 1248 | if (os.conn < C_CONNECTED && ns.conn >= C_CONNECTED) |
1266 | drbd_resume_al(mdev); | 1249 | drbd_resume_al(mdev); |
1267 | 1250 | ||
1268 | /* Start a new epoch in case we start to mirror write requests */ | ||
1269 | if (!drbd_should_do_remote(os) && drbd_should_do_remote(ns)) | ||
1270 | tl_forget(mdev); | ||
1271 | |||
1272 | /* Do not add local-only requests to an epoch with mirrored requests */ | ||
1273 | if (drbd_should_do_remote(os) && !drbd_should_do_remote(ns)) | ||
1274 | set_bit(CREATE_BARRIER, &mdev->flags); | ||
1275 | |||
1276 | ascw = kmalloc(sizeof(*ascw), GFP_ATOMIC); | 1251 | ascw = kmalloc(sizeof(*ascw), GFP_ATOMIC); |
1277 | if (ascw) { | 1252 | if (ascw) { |
1278 | ascw->os = os; | 1253 | ascw->os = os; |