[OpenAFS] Documentation for `afsd` argument `files_per_subdir` is wrong (out of sync with the implementation)

Mark Vitale mvitale@sinenomine.net
Fri, 8 Mar 2019 18:27:10 +0000


Hi Ciprian,

> On Mar 8, 2019, at 11:15 AM, Ciprian Dorin Craciun <ciprian.craciun@gmail=
.com> wrote:
>=20
> Hello all!
>=20
> I'm using OpenAFS on OpenSUSE, version 1.8.x (in fact 1.8.0 and 1.8.2
> on two nodes), and although the documentation for the `afsd` daemon
> states for `files_per_subdir` that:
> ~~~~
> files_per_subdir -- Limits the number of cache files in each
> subdirectory of the cache directory. The value of the option should be
> the base-two log of the number of cache files per cache subdirectory
> (so 10 for 1024 files, 14 for 16384 files, and so forth).
> ~~~~
>=20
> It is in fact use without the exponential transformation.  I.e.
> setting `-files_per_subdir 10` will actually result in exactly 10
> files per directory, meanwhile `-files_per_subdir 1024` would
> correctly result in 1K files.

Thank you for your report.  I recently discovered this independently and
took a note of it, but forgot to do anything about it!

The -files_per_subdir option was added to OpenAFS very early in its history=
.
It was part of a change to improve the performance of initializing a large =
cache.
At first, it was indeed implemented as a 'log' value; later, it was changed=
 to
a scalar, but the documentation was never changed to match.  So this is a=20
documentation error.

I've opened a ticket for you: =20

https://rt.central.org/rt/Ticket/Display.html?id=3D134915

Regards,
--
Mark Vitale
mvitale@sinenomine.net