Skip to content

Conversation

@archeoss
Copy link
Contributor

@archeoss archeoss commented Aug 9, 2023

Closes #825

Note 1: usage of frsize instead of bsize seems to do nothing (at least on Linux). Needs to be tested on some Mac machine, where it's first occured. Also this change about frsize needs to be done after #823 will be merged, since that function was rewritten there

@archeoss archeoss linked an issue Aug 9, 2023 that may be closed by this pull request
@archeoss archeoss changed the title redo disks mapping [825] Incorrect disk space calculation inside docker container Aug 9, 2023
@archeoss archeoss requested a review from ikopylov August 9, 2023 23:27
@archeoss archeoss marked this pull request as draft August 10, 2023 11:04
@archeoss archeoss marked this pull request as ready for review August 15, 2023 12:55
@archeoss archeoss marked this pull request as draft August 20, 2023 13:13
@archeoss archeoss marked this pull request as ready for review August 20, 2023 14:21
@ikopylov
Copy link
Member

Please, do not forget to fix space calculation from results of statvfs syscall. It should use frsize instead of bsize

if dev_path
.iter()
.filter(|(dev, _)| *dev == metadata.dev())
.any(|(_, path)| disk.mount_point().file_name() == path.file_name())
Copy link
Member

Choose a reason for hiding this comment

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

This is not correct. We should check that disk.mount_point() is a prefix of path. Example: mount_point = "/opt/disk1/", path = "/opt/disk1/bob". Use starts_with function

@archeoss archeoss requested a review from ikopylov January 29, 2024 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect disk space calculation inside docker container

2 participants