-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensured filesystem Used signal is sent if used value has changed on filesystem check #3639
Ensured filesystem Used signal is sent if used value has changed on filesystem check #3639
Conversation
Need to process filesystems with a size change, also. Signed-off-by: mulhern <[email protected]>
Signed-off-by: mulhern <[email protected]>
It can function in the case that there is no need to actually extend the filesystem, but only to communicate about the filesystem changes. Signed-off-by: mulhern <[email protected]>
This approach is acceptable only if it is ok to spawn a thread for every filesystem. |
With simple test:
The filesystem Used signal is not emitted on HEAD (although pool TotalPhysicalUse signal is); it is emitted with this PR. It is not emitted on an fs that is not written to. |
@jbaublitz This draft PR contains all the essentials and is somewhat tested. Plz let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at this for a while and the only change I wanted to potentially discuss is that I'm a bit unclear on what the benefit is of running a diff in the case of a filesystem that isn't mounted. Is that just for the sake of code simplicity? I see how it's necessary to run the diff code even when the extend size is zero, but I'm not entirely sure why we're doing that in the case where the filesystem isn't mounted.
I agree that's too much. I think to address that I should change |
ubuntu test failures look like infrastructure |
Why not just still used |
We need two bits of info to know whether the filesystem should just be visited or whether it should also be extended. I'm trying out calling extend_size from should_visit only if the filesystem should be extended and returning 0 if the filesystem should not be extended. |
@jbaublitz Ok. This is ready again. |
@mvollmer We believe this fixes the bug you reported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After our discussion, this looks good to me.
Change should_extend and have it transitively invoke extend_size. Make extend_size a private method that takes self. * private because it is not called from an external function * takes self to calculate thindev size and remaining size in case it has a filesystem limit. Since strictly more threads are started than were previously, insert a post-check on the change that has occurred in order to decide whether metadata should be written or D-Bus signals sent. Signed-off-by: mulhern <[email protected]>
15ca7b4
to
4c1dd79
Compare
Testing farm tests are hanging...presumably this is an infrastructure problem. Merging... |
Closes #3634