|
|
@@ -1592,11 +1592,15 @@ void drbd_resync_after_changed(struct drbd_device *device)
|
|
|
|
|
|
void drbd_rs_controller_reset(struct drbd_device *device)
|
|
|
{
|
|
|
+ struct gendisk *disk = device->ldev->backing_bdev->bd_contains->bd_disk;
|
|
|
struct fifo_buffer *plan;
|
|
|
|
|
|
atomic_set(&device->rs_sect_in, 0);
|
|
|
atomic_set(&device->rs_sect_ev, 0);
|
|
|
device->rs_in_flight = 0;
|
|
|
+ device->rs_last_events =
|
|
|
+ (int)part_stat_read(&disk->part0, sectors[0]) +
|
|
|
+ (int)part_stat_read(&disk->part0, sectors[1]);
|
|
|
|
|
|
/* Updating the RCU protected object in place is necessary since
|
|
|
this function gets called from atomic context.
|
|
|
@@ -1743,7 +1747,6 @@ void drbd_start_resync(struct drbd_device *device, enum drbd_conns side)
|
|
|
device->rs_failed = 0;
|
|
|
device->rs_paused = 0;
|
|
|
device->rs_same_csum = 0;
|
|
|
- device->rs_last_events = 0;
|
|
|
device->rs_last_sect_ev = 0;
|
|
|
device->rs_total = tw;
|
|
|
device->rs_start = now;
|