atomic_add(data_size >> 9, &mdev->rs_sect_ev);
if (drbd_submit_peer_request(mdev, peer_req, WRITE, DRBD_FAULT_RS_WR) == 0)
- return true;
+ return 0;
/* don't care for the reason here */
dev_err(DEV, "submit failed, triggering re-connect\n");
drbd_free_ee(mdev, peer_req);
fail:
put_ldev(mdev);
- return false;
+ return -EIO;
}
static struct drbd_request *
/* data is submitted to disk within recv_resync_read.
* corresponding put_ldev done below on error,
* or in drbd_peer_request_endio. */
- ok = recv_resync_read(mdev, sector, data_size);
+ ok = !recv_resync_read(mdev, sector, data_size);
} else {
if (__ratelimit(&drbd_ratelimit_state))
dev_err(DEV, "Can not write resync data to local disk.\n");