-
-
Notifications
You must be signed in to change notification settings - Fork 219
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
feat: show Btrfs subvolumes #1176
base: main
Are you sure you want to change the base?
Conversation
b0b1465
to
5a600e2
Compare
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'm not sure which one is better and how to benchmark.
you can run a version with and without changes on a couple of different directories with a bunch of flags using hyperfine
and see if it indicates stuff getting slower
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.
lgtm
I ran some simple tests on a loop device formatted into Btrfs,
Searching for parent mountpoint recursively:
Do nothing and return
|
You'll probably need to test with a few (hundred) thousand more, as well as nested directories, nested subvolumes, and if possible slow (HDD) devices for each of the options. |
My laptop has no HDD attached to it, so I'm using |
Show Btrfs subvolumes as underlined blue text.
A similar version was implemented in #53 , but not been merged as in #167 .
Some questions:
I came up with two ways to tell if a file is in Btrfs,
1. Searching for parent directory recursively in
/proc/mounts
2. Using glibc's
statfs
and checkf_type
statfs
syscallI'm not sure which one is better and how to benchmark.
Here I just kept them both and the second one only works as a fallback.
I have no idea how all the theming works, I just copy the codes from
mount_point
.