Skip to content

Commit

Permalink
tresor: unused args at "R/W client data" at blk IO
Browse files Browse the repository at this point in the history
The request classes Block_io::Read_client_data and Block_io::Write_client_data
used to receive a block reference for no reason. This commit removes these
args.

Ref genodelabs#5062
  • Loading branch information
m-stein committed Dec 4, 2023
1 parent 2907bbe commit 569ba27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions repos/gems/src/lib/tresor/include/tresor/block_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ class Tresor::Block_io : public Module
struct Write_client_data : Request
{
Write_client_data(Module_id m, Module_channel_id c, Physical_block_address p, Virtual_block_address v,
Key_id k, Request_tag t, Request_offset o, Block const &b, Hash &h, bool &s)
: Request(m, c, Request::WRITE_CLIENT_DATA, o, t, k, p, v, *const_cast<Block*>(&b), h, s) { }
Key_id k, Request_tag t, Request_offset o, Hash &h, bool &s)
: Request(m, c, Request::WRITE_CLIENT_DATA, o, t, k, p, v, *(Block*)0, h, s) { }
};

struct Read_client_data : Request
{
Read_client_data(Module_id m, Module_channel_id c, Physical_block_address p, Virtual_block_address v,
Key_id k, Request_tag t, Request_offset o, Block &b, bool &s)
: Request(m, c, Request::READ_CLIENT_DATA, o, t, k, p, v, b, *(Hash*)0, s) { }
Key_id k, Request_tag t, Request_offset o, bool &s)
: Request(m, c, Request::READ_CLIENT_DATA, o, t, k, p, v, *(Block*)0, *(Hash*)0, s) { }
};

Block_io(Vfs::Env &, Xml_node const &);
Expand Down
6 changes: 3 additions & 3 deletions repos/gems/src/lib/tresor/virtual_block_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void Virtual_block_device_channel::_read_vba(bool &progress)
} else
_generate_req<Block_io::Read_client_data>(
READ_BLK_SUCCEEDED, progress, node.pba, _vba, req._curr_key_id,
req._client_req_tag, req._client_req_offset, _data_blk);
req._client_req_tag, req._client_req_offset);
_lvl--;
break;
}
Expand Down Expand Up @@ -255,7 +255,7 @@ void Virtual_block_device_channel::_write_vba(bool &progress)
else
_generate_req<Block_io::Write_client_data>(
WRITE_BLK_SUCCEEDED, progress, _new_pbas.pbas[0], _vba,
req._curr_key_id, req._client_req_tag, req._client_req_offset, _data_blk, _hash);
req._curr_key_id, req._client_req_tag, req._client_req_offset, _hash);
}
_lvl--;
break;
Expand All @@ -267,7 +267,7 @@ void Virtual_block_device_channel::_write_vba(bool &progress)

_generate_req<Block_io::Write_client_data>(
WRITE_BLK_SUCCEEDED, progress, _new_pbas.pbas[0], _vba, req._curr_key_id,
req._client_req_tag, req._client_req_offset, _data_blk, _hash);
req._client_req_tag, req._client_req_offset, _hash);

break;

Expand Down

0 comments on commit 569ba27

Please sign in to comment.