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

Documentation of possible values for -o tidy_strategy is missing from the man page of dwarfs #249

Open
maxigaz opened this issue Feb 22, 2025 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation fixready

Comments

@maxigaz
Copy link

maxigaz commented Feb 22, 2025

I installed dwarfs 0.10.2 from the AUR on Arch Linux. Looking at man dwarfs, I found that some documentation of the option -o tidy_strategy is missing.

Here's how it looks for me:

Image

However, if I open https://github.com/mhx/dwarfs/blob/main/doc/dwarfs.md or https://raw.githubusercontent.com/mhx/dwarfs/refs/heads/main/doc/dwarfs.md in a web browser, all the options are mentioned there, as expected.

- `-o tidy_strategy=`*name*:
  Use one of the following strategies to tidy the block cache:

  - `none`:
    This is the default strategy that never tidies the cache.
    Blocks will only be evicted from the cache if the cache is
    full and a more recently used block is added to the cache.

  - `time`:
    Time based tidying strategy. Every `tidy_interval`, the block
    cache is traversed and all blocks that have not been accessed
    for more then `tidy_max_age` will be removed.

  - `swap`:
    Swap based tidying strategy. Every `tidy_interval`, the block
    cache is traversed and all blocks that have been fully or
    partially swapped out by the kernel will be removed.

- `-o tidy_interval=`*time*:
  Used only if `tidy_strategy` is not `none`. This is the interval
  at which the cache tidying thread wakes up to look for blocks
  that can be removed from the cache. This must be an integer value.
  Suffixes `ms`, `s`, `m`, `h` are supported. If no suffix is given,
  the value will be assumed to be in seconds.

- `-o tidy_max_age=`*time*:
  Used only if `tidy_strategy` is `time`. A block will be removed
  from the cache if it hasn't been used for this time span. This must
  be an integer value. Suffixes `ms`, `s`, `m`, `h` are supported.
  If no suffix is given, the value will be assumed to be in seconds.

Could it be that the those list items were not recognised during the conversion from markdown to the manpage format?

@mhx
Copy link
Owner

mhx commented Feb 22, 2025

Thank you for catching and reporting this!

Could it be that the those list items were not recognised during the conversion from markdown to the manpage format?

That's exactly what's happening. If you try dwarfs --man, which uses a different library to turn markdown into an embeddable manual page, you should also see the list of strategies.

It seems that ronn-ng has an open issue for the problem. I'll see if there's a quick fix, but I'd prefer to rely on an upstream fix in ronn-ng.

mhx added a commit that referenced this issue Feb 24, 2025
Given how long the [issue](apjanke/ronn-ng#16)
is open already, it probably won't be fixed very soon.

Furthermore, this makes the documentation of `tidy_strategy` more
consistent with other options (e.g. `mlock`).
@mhx mhx self-assigned this Feb 24, 2025
@mhx mhx added bug Something isn't working documentation Improvements or additions to documentation fixready and removed bug Something isn't working labels Feb 24, 2025
@mhx
Copy link
Owner

mhx commented Feb 25, 2025

I've changed the docs to not use nested indentation. This was the only place where it was used, and it was even inconsistent with the documentation of similar options. If there's another maintenance release on the 0.10.x branch, it'll go in there, otherwise it'll be part of the 0.11.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation fixready
Projects
None yet
Development

No branches or pull requests

2 participants