Re: [PATCH 7/8] xfs: factor out a xlog_write_full_log_vec helper

Christoph Hellwig
2021-06-18T13:33:55Z

On Thu, Jun 17, 2021 at 12:24:26PM -0400, Brian Foster wrote:
> > +{
> > + int i;
> > +
> > + ASSERT(*log_offset + *len <= iclog->ic_size ||
> > + iclog->ic_state == XLOG_STATE_WANT_SYNC);
>
> I suspect this could be lifted into the original caller (xlog_write())
> since it doesn't have much to do with the current lv (and this is
> eventually no longer called for each lv in the chain)..? Otherwise the
> patch LGTM.

Yes, I guess we should just move it before the main loop over the lv
in the next patch and just keep it where it is for now. That will
remove the additional invocations if we switch back from partial
to simple iclog writes, but given that len and log_offset are updated
together the extra asserts are rather pointless anyway.