lv_bytes is mostly just use by the CIL code, but has crept into the
low-level log writing code to decide on a full or partial iclog
write. Ensure it is valid even for the special log writes that don't
go through the CIL by initializing it in xlog_write_one_vec.
Signed-off-by: Christoph Hellwig <hch@lst.de>
struct xfs_log_vec lv = {
.lv_niovecs = 1,
.lv_iovecp = reg,
+ .lv_bytes = reg->i_len,
};
LIST_HEAD (lv_chain);
/* account for space used by record data */
- ticket->t_curr_res -= reg->i_len;
+ ticket->t_curr_res -= lv.lv_bytes;
list_add(&lv.lv_list, &lv_chain);
- return xlog_write(log, ctx, &lv_chain, ticket, reg->i_len);
+ return xlog_write(log, ctx, &lv_chain, ticket, lv.lv_bytes);
}
/*