Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/iocore/cache/PreservationTable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ DbgCtl dbg_ctl_cache_evac{"cache_evac"};

} // namespace

PreservationTable::PreservationTable(int size) : evacuate_size{(size / EVACUATION_BUCKET_SIZE) + 2}
PreservationTable::PreservationTable(off_t size) : evacuate_size{static_cast<int>(size / EVACUATION_BUCKET_SIZE) + 2}
{
ink_assert(size > 0);
int evac_len = this->evacuate_size * sizeof(DLL<EvacuationBlock>);
Expand Down
2 changes: 1 addition & 1 deletion src/iocore/cache/PreservationTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class PreservationTable
* @param size The total number of directory entries the table must
* be able to store. The size must be a positive number.
*/
PreservationTable(int size);
PreservationTable(off_t size);

~PreservationTable();

Expand Down
2 changes: 1 addition & 1 deletion src/iocore/cache/StripeSM.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ StripeSM::StripeSM(CacheDisk *disk, off_t blocks, off_t dir_skip, int avg_obj_si
Stripe{disk, blocks, dir_skip, avg_obj_size, fragment_size},
fd{disk->fd},
disk{disk},
_preserved_dirs{static_cast<int>(len)}
_preserved_dirs{len}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using off_t seems makes sense because this Stripe::len is off_t.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could also look at how big a change it would be to make the table size an off_t type, but I need to be careful because I don't understand yet why they were different in the first place. It seems like using the same type for both would be more consistent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has not been done yet, but I am adding it to my personal TODO.

{
open_dir.mutex = this->mutex;
SET_HANDLER(&StripeSM::aggWrite);
Expand Down