diff --git a/repos/os/include/block_session/connection.h b/repos/os/include/block_session/connection.h index dfdbce8847..5b6a9c9e07 100644 --- a/repos/os/include/block_session/connection.h +++ b/repos/os/include/block_session/connection.h @@ -127,7 +127,7 @@ struct Block::Connection : Genode::Connection, Session_client Operation const operation = job._curr_operation(); size_t const block_size = job._connection._info.block_size; - fn(operation.block_number * block_size, + fn(job._position * block_size, Genode::min(job._payload.bytes, operation.count * block_size)); } @@ -142,7 +142,7 @@ struct Block::Connection : Genode::Connection, Session_client Packet_descriptor const p(_curr_operation(), _payload, tag); if (_operation.type == Operation::Type::WRITE) - _with_offset_and_length(job, [&] (seek_off_t offset, size_t length) { + _with_offset_and_length(job, [&] (off_t offset, size_t length) { policy.produce_write_content(job, offset, tx.packet_content(p), length); }); @@ -306,7 +306,7 @@ struct Block::Connection : Genode::Connection, Session_client * communication buffer shared with the server) * \param length size of 'dst' buffer in bytes */ - void produce_write_content(Job &, seek_off_t offset, + void produce_write_content(Job &, off_t offset, char *dst, size_t length); /** @@ -316,7 +316,7 @@ struct Block::Connection : Genode::Connection, Session_client * \param src pointer to received data * \param length number of bytes received */ - void consume_read_result(Job &, seek_off_t offset, + void consume_read_result(Job &, off_t offset, char const *src, size_t length); /** @@ -372,7 +372,7 @@ bool Block::Connection::_try_process_ack(POLICY &policy, Tx::Source &tx) _tags.template apply<_JOB>(id, [&] (_JOB &job) { if (type == Operation::Type::READ) - Job::_with_offset_and_length(job, [&] (seek_off_t offset, size_t length) { + Job::_with_offset_and_length(job, [&] (off_t offset, size_t length) { policy.consume_read_result(job, offset, tx.packet_content(p), length); });