/* w_send_read_req() - Worker callback to send a read request (P_DATA_REQUEST) packet @mdev: DRBD device. @w: work object. @cancel: The connection will be closed anyways  */
int w_send_read_req(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
/* w_send_read_req() - Worker callback to send a read request (P_DATA_REQUEST) packet @mdev: DRBD device. @w: work object. @cancel: The connection will be closed anyways  */
int w_send_read_req(struct drbd_conf *mdev, struct drbd_work *w, int cancel)
{
	struct drbd_request *req = container_of(w, struct drbd_request, w);
	int ok;
	if (unlikely(cancel)) {
		req_mod(req, send_canceled);
		return 1;
	}
	ok = drbd_send_drequest(mdev, P_DATA_REQUEST, req->sector, req->size,
				(unsigned long)req);
	if (!ok) {
		if (mdev->state.conn >= C_CONNECTED)
			drbd_force_state(mdev, NS(conn, C_NETWORK_FAILURE));
	}
	req_mod(req, ok ? handed_over_to_network : send_failed);
	return ok;
}