/* _drbd_send_ack() - Sends an ack packet @mdev: DRBD device. @cmd: Packet command code. @sector: sector, needs to be in big endian byte order @blksize: size in byte, needs to be in big endian byte order @block_id: Id, big endian byte order  */
static int _drbd_send_ack(struct drbd_conf *mdev, enum drbd_packets cmd, u64 sector, u32 blksize, u64 block_id)
/* _drbd_send_ack() - Sends an ack packet @mdev: DRBD device. @cmd: Packet command code. @sector: sector, needs to be in big endian byte order @blksize: size in byte, needs to be in big endian byte order @block_id: Id, big endian byte order  */
static int _drbd_send_ack(struct drbd_conf *mdev, enum drbd_packets cmd, u64 sector, u32 blksize, u64 block_id)
{
	int ok;
	struct p_block_ack p;
	p.sector   = sector;
	p.block_id = block_id;
	p.blksize  = blksize;
	p.seq_num  = cpu_to_be32(atomic_add_return(1, &mdev->packet_seq));
	if (!mdev->meta.socket || mdev->state.conn < C_CONNECTED)
		return FALSE;
	ok = drbd_send_cmd(mdev, USE_META_SOCKET, cmd,
				(struct p_header *)&p, sizeof(p));
	return ok;
}