On Fri, Mar 2, 2018 at 7:04 PM, Robert Haas <robertmh...@gmail.com> wrote:

> On Fri, Mar 2, 2018 at 6:23 AM, Magnus Hagander <mag...@hagander.net>
> wrote:
> > Another quick note -- we need to assert that the size of the buffer is
> > actually divisible by BLCKSZ. I don't think it's a common scenario, but
> it
> > could break badly if somebody changes BLCKSZ. Either that or perhaps just
> > change the TARSENDSIZE to be a multiple of BLCKSZ.
>
> I think that this patch needs to support all block sizes that are
> otherwise supported -- failing an assertion doesn't seem like a
> reasonable option, unless it only happens for block sizes we don't
> support anyway.
>

That's not what I meant. What I meant is to fail on an assertion if
TARSENDSIZE is not evenly divisible by BLCKSZ. (Or well, maybe not an
assertion, but an actual compile time error). Since BLCKSZ is changed only
at compile time, we can either trap the case already at compile, or just
define it away. But we should handle it.


-- 
 Magnus Hagander
 Me: https://www.hagander.net/ <http://www.hagander.net/>
 Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

Reply via email to