Skip to content
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

Master btrfs a #107

Closed
wants to merge 6 commits into from
Closed

Conversation

mulkieran
Copy link
Contributor

Supersedes PR#105.

First two patches are very minor.

"Make mountsCache..." and "Make default subvolspec" are substantially as before."

"Use context manager..." and "Cache mountinfo..." are new.

Signed-off-by: mulhern <amulhern@redhat.com>
Signed-off-by: mulhern <amulhern@redhat.com>
Externally to the mountsCache it seems that sometimes the subvolspec is
a str, sometimes an int. Make mountsCache store and retrieve treating
subvolspec always as a str.

Signed-off-by: mulhern <amulhern@redhat.com>
Signed-off-by: mulhern <amulhern@redhat.com>
It is possible that /proc/self/mountinfo changes during execution of
_getActiveMounts, but it is also possible that /proc/mounts changes,
and we do not guard against that.

The motivation behind this is that it is expensive to parse on average half
the file for some supplementary information about btrfs everytime it is
needed.

The downside of this cacheing is that a data structure gets held in memory
for the duration of _getActiveMounts execution, although this only happens
if btrfs info is requested.

Also, there is a slight improvement in the way the slightly variable format
data in mountinfo is parsed.

Signed-off-by: mulhern <amulhern@redhat.com>
Signed-off-by: mulhern <amulhern@redhat.com>
@mulkieran mulkieran mentioned this pull request May 7, 2015
@mulkieran mulkieran closed this May 12, 2015
@mulkieran mulkieran deleted the master-btrfs-a branch May 12, 2015 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants