Bug 13610 - BTRFS - Extend index.cgi to proper deal with BTRFS volumes
Summary: BTRFS - Extend index.cgi to proper deal with BTRFS volumes
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: unspecified Unspecified
: - Unknown - - Unknown -
Assignee: Stefan Schantl
QA Contact:
URL:
Keywords:
Depends on:
Blocks: BTRFS
  Show dependency treegraph
 
Reported: 2024-03-03 18:22 UTC by Stefan Schantl
Modified: 2024-03-15 14:47 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Schantl 2024-03-03 18:22:56 UTC
Extend the perl code of the index.cgi to proper calculate the free disk space in case the root filesystem is BTRFS.

The current used "df" does not proper work with BTRFS. Here "btrfs filesystem df <path>" needs to be called and parsed.
Comment 1 Michael Tremer 2024-03-05 09:58:16 UTC
I actually wouldn't mind if we would entire rewrite this. Calling df does not seem to be a good solution. There is also a long list of things we filter out. It doesn't seem to be clean and it is very slow code.
Comment 2 Stefan Schantl 2024-03-15 14:43:56 UTC
Hello Michael,

I've cleaned up the corresponding code a bit and hopefully it is faster now.

https://git.ipfire.org/?p=people/stevee/ipfire-2.x.git;a=commit;h=5727a67ded49305ed931312526a192cbb05284a5
Comment 3 Stefan Schantl 2024-03-15 14:47:22 UTC
The code has been extended to proper deal with BTRFS volumes:

https://git.ipfire.org/?p=people/stevee/ipfire-2.x.git;a=commit;h=493a03e2b69746d6ea86d4bafdf72c57e7c5d89d