Closed robn closed 2 days ago
Ok, repushed with decimal bytes. Surprising controversy! :sweat_smile:
istg it drives me mad that user and kernel code have different ideas of what %lu
and %llu
are.
istg it drives me mad that user and kernel code have different ideas of what
%lu
and%llu
are.
Is there a place where they don't mean long unsigned
and long long unsigned
?
istg it drives me mad that user and kernel code have different ideas of what
%lu
and%llu
are.Is there a place where they don't mean
long unsigned
andlong long unsigned
?
Fair, my grumble was not very specific. It's more that on Linux (at least), uint64_t
is long unsigned int
in the kernel, but long long unsigned int
in userspace. In shared code, the compiler will complain about both %lu
and %llu
, one in the kernel build, one in the user build. That is very annoying, but at least a reminder to add a cast. In userspace-only code, we end up here.
I keep meaning to find out exactly why uint64_t
is defined differently.
I suppose I have no real cause for complaint, %lu
and %llu
say what they are, and PRIu64
is there for exactly this reason. But also that's a hassle to remember to type out, including closing the quotes; the inline %abc
is much easier. If -Wformat
would outright reject any use of %lu
with something that isn't explicitly long unsigned
(ditto %llu
) then it'd be fine; I'd quickly train the muscle memory to use PRIu64
. When the compiler doesn't complain though, I don't notice.
[Sponsors: Klara, Inc., Wasabi Technology, Inc.]
Motivation and Context
Commenting on #16752, and realised we didn't have a way to definitely show what kind dedup options are in place.
Description
Extends
dump_ddt()
to show container config (version, flags) and log flags and other info. A bit more lowlevel detail as befits a debugger.Goes on to show the histograms and etc as it did before, so something for everyone.
How Has This Been Tested?
Just eyeballing on various test dedup configs and load generators I have lying around.
Types of changes
Checklist:
Signed-off-by
.