mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 08:23:56 +01:00
ircd::db::database::env: Fix size assumption for this->buffer.
This commit is contained in:
parent
0a7b8f03c9
commit
9e7991900c
1 changed files with 8 additions and 8 deletions
|
@ -2740,22 +2740,22 @@ ircd::db::database::env::writable_file_direct::_write__aligned(const const_buffe
|
|||
return {};
|
||||
}
|
||||
|
||||
size_t
|
||||
ircd::db::database::env::writable_file_direct::buffer_remain()
|
||||
const
|
||||
{
|
||||
return size(buffer) - buffer_consumed();
|
||||
}
|
||||
|
||||
size_t
|
||||
ircd::db::database::env::writable_file_direct::buffer_consumed()
|
||||
const
|
||||
{
|
||||
return likely(alignment != 0)?
|
||||
logical_offset % alignment:
|
||||
logical_offset % size(buffer):
|
||||
0UL;
|
||||
}
|
||||
|
||||
size_t
|
||||
ircd::db::database::env::writable_file_direct::buffer_remain()
|
||||
const
|
||||
{
|
||||
return remain(logical_offset);
|
||||
}
|
||||
|
||||
size_t
|
||||
ircd::db::database::env::writable_file_direct::blocks(const size_t &value)
|
||||
const
|
||||
|
|
Loading…
Reference in a new issue