Dynamically size buffers in ggatec.
Instead of static size on the stack.
there's diff context missing here.
In general, this is a definite improvement over fixed size buffers (that are actually liable to subtle overruns).
Why ssize_t? The value can never be negative and it's only used to assign to an off_t. I would suggest this be size_t.
I think this only warrants LOG_DEBUG, not LOG_NOTICE. Particularly with ZFS, I/Os can be arbitrary sized so it's quite normal for them to exceed MAXPHYS. That's likely to make this noisy, unless there's a particularly write early on.
style(9) requires that all variable declarations come at the top of the function.
As per the comment above, I don't think ssize_t is the most appropriate type here.
Variable declarations should be at the top of the function.
copy pasta, size_t is good.
Yep noticed quite a bit of log spam myself.
If we ever update style I think that'd be a good rule to get rid of... i'm a big fan of declare & define & init on first use, esp since it has safety implications.