Lines Matching defs:lv

281 		struct xfs_log_vec *lv;
343 lv = xlog_kvmalloc(buf_size);
345 memset(lv, 0, xlog_cil_iovec_space(niovecs));
347 INIT_LIST_HEAD(&lv->lv_list);
348 lv->lv_item = lip;
349 lv->lv_size = buf_size;
351 lv->lv_buf_len = XFS_LOG_VEC_ORDERED;
353 lv->lv_iovecp = (struct xfs_log_iovec *)&lv[1];
354 lip->li_lv_shadow = lv;
357 lv = lip->li_lv_shadow;
359 lv->lv_buf_len = XFS_LOG_VEC_ORDERED;
361 lv->lv_buf_len = 0;
362 lv->lv_bytes = 0;
365 /* Ensure the lv is set up according to ->iop_size */
366 lv->lv_niovecs = niovecs;
369 lv->lv_buf = (char *)lv + xlog_cil_iovec_space(niovecs);
381 struct xfs_log_vec *lv,
386 if (lv->lv_buf_len != XFS_LOG_VEC_ORDERED)
387 *diff_len += lv->lv_bytes;
397 if (lv->lv_item->li_ops->iop_pin)
398 lv->lv_item->li_ops->iop_pin(lv->lv_item);
399 lv->lv_item->li_lv_shadow = NULL;
400 } else if (old_lv != lv) {
401 ASSERT(lv->lv_buf_len != XFS_LOG_VEC_ORDERED);
404 lv->lv_item->li_lv_shadow = old_lv;
408 lv->lv_item->li_lv = lv;
416 if (!lv->lv_item->li_seq)
417 lv->lv_item->li_seq = log->l_cilp->xc_ctx->sequence;
430 * dependent on the current state of the vector in the CIL - the shadow lv is
432 * use that if we can't reuse the existing lv. If we can't reuse the existing
433 * lv, then simple swap it out for the shadow lv. We don't free it - that is
463 struct xfs_log_vec *lv;
474 * the shadow lv on the log item.
488 lv = lip->li_lv;
497 *diff_len -= lv->lv_bytes;
499 /* Ensure the lv is set up according to ->iop_size */
500 lv->lv_niovecs = shadow->lv_niovecs;
502 /* reset the lv buffer information for new formatting */
503 lv->lv_buf_len = 0;
504 lv->lv_bytes = 0;
505 lv->lv_buf = (char *)lv +
506 xlog_cil_iovec_space(lv->lv_niovecs);
509 lv = shadow;
510 lv->lv_item = lip;
518 ASSERT(IS_ALIGNED((unsigned long)lv->lv_buf, sizeof(uint64_t)));
519 lip->li_ops->iop_format(lip, lv);
521 xfs_cil_prepare_item(log, lv, old_lv, diff_len);
701 struct xfs_log_vec *lv;
704 lv = list_first_entry(lv_chain, struct xfs_log_vec, lv_list);
705 list_del_init(&lv->lv_list);
706 kvfree(lv);
1067 struct xfs_log_vec *lv;
1078 lv = item->li_lv;
1079 lv->lv_order_id = item->li_order_id;
1082 if (lv->lv_buf_len != XFS_LOG_VEC_ORDERED)
1083 *num_bytes += lv->lv_bytes;
1084 *num_iovecs += lv->lv_niovecs;
1085 list_add_tail(&lv->lv_list, &ctx->lv_chain);
1258 * Add the lvhdr to the head of the lv chain we pass to xlog_write() so