feat: show Btrfs subvolumes - #1176
Conversation
b0b1465 to
5a600e2
Compare
cafkafk
left a comment
There was a problem hiding this comment.
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
|
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 |
This comment was marked as resolved.
This comment was marked as resolved.
gierens
left a comment
There was a problem hiding this comment.
LGTM Thanks!
One thing: once this is merged a PR to eza-themes to add the option here: https://github.com/eza-community/eza-themes/blob/57149851f07b3ee6ca94f5fe3d9d552f73f8b8b4/themes/default.yml#L14 , just so people no this option exists.
|
Updated the branch to the current main. |
|
@cafkafk this seems ready for merge |
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/mounts2. Using glibc's
statfsand checkf_typestatfssyscallI'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.