fsfs block size and page size config parameters
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 30 Jun 2014 17:33:41 +0100
Hi Stefan.
fs_fs.c:
^^ Can you state the size units explicitly in the commentary please? (If an admin has changed the value to say "4" or "4096" then the implicit clue of "64" matching "64 kBytes" would be lost.)
> "###" NL
^^ Same for this one.
fs.h:
And here? (Here it's bytes not kilobytes, I believe.)
> /* Capacity in entries of log-to-phys index pages */
For disambiguation, maybe call it "l2p_page_entries" or "l2p_page_size_entries" instead? Otherwise my instinct is to assume the same units as p2l_page_size.
> /* Rev / pack file granularity covered by phys-to-log index pages */
And here?
> ... }
The initialization code converts kilobytes to bytes:
fs_fs.c:
But no such multiplier for l2p_page_size? Oh, that's because it's measured in entries rather than bytes/kilobytes. That confused me when I first read this: it looked like an accidental omission.
> }
At first I thought these numbers were different from above, then I noticed the multipliers above and decided they're the same end result, but then hours later I noticed the 'block size' here is _not_ equal to 64 x 0x400 (which would be 0x10000 not 0x1000).
I know this last set of values "should be irrelevant" but we should avoid hard-to-spot differences like this one. Can you write this so there are not so many different numbers in the source code? How about using defined constants, since each one appears approx. 4 times including the config file commentary?
- Julian
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.