Lines Matching full:lv
276 struct xfs_log_vec *lv; in xlog_cil_alloc_shadow_bufs() local
338 lv = xlog_kvmalloc(buf_size); in xlog_cil_alloc_shadow_bufs()
340 memset(lv, 0, xlog_cil_iovec_space(niovecs)); in xlog_cil_alloc_shadow_bufs()
342 INIT_LIST_HEAD(&lv->lv_list); in xlog_cil_alloc_shadow_bufs()
343 lv->lv_item = lip; in xlog_cil_alloc_shadow_bufs()
344 lv->lv_size = buf_size; in xlog_cil_alloc_shadow_bufs()
346 lv->lv_buf_len = XFS_LOG_VEC_ORDERED; in xlog_cil_alloc_shadow_bufs()
348 lv->lv_iovecp = (struct xfs_log_iovec *)&lv[1]; in xlog_cil_alloc_shadow_bufs()
349 lip->li_lv_shadow = lv; in xlog_cil_alloc_shadow_bufs()
352 lv = lip->li_lv_shadow; in xlog_cil_alloc_shadow_bufs()
354 lv->lv_buf_len = XFS_LOG_VEC_ORDERED; in xlog_cil_alloc_shadow_bufs()
356 lv->lv_buf_len = 0; in xlog_cil_alloc_shadow_bufs()
357 lv->lv_bytes = 0; in xlog_cil_alloc_shadow_bufs()
360 /* Ensure the lv is set up according to ->iop_size */ in xlog_cil_alloc_shadow_bufs()
361 lv->lv_niovecs = niovecs; in xlog_cil_alloc_shadow_bufs()
364 lv->lv_buf = (char *)lv + xlog_cil_iovec_space(niovecs); in xlog_cil_alloc_shadow_bufs()
376 struct xfs_log_vec *lv, in xfs_cil_prepare_item() argument
380 /* Account for the new LV being passed in */ in xfs_cil_prepare_item()
381 if (lv->lv_buf_len != XFS_LOG_VEC_ORDERED) in xfs_cil_prepare_item()
382 *diff_len += lv->lv_bytes; in xfs_cil_prepare_item()
385 * If there is no old LV, this is the first time we've seen the item in in xfs_cil_prepare_item()
392 if (lv->lv_item->li_ops->iop_pin) in xfs_cil_prepare_item()
393 lv->lv_item->li_ops->iop_pin(lv->lv_item); in xfs_cil_prepare_item()
394 lv->lv_item->li_lv_shadow = NULL; in xfs_cil_prepare_item()
395 } else if (old_lv != lv) { in xfs_cil_prepare_item()
396 ASSERT(lv->lv_buf_len != XFS_LOG_VEC_ORDERED); in xfs_cil_prepare_item()
399 lv->lv_item->li_lv_shadow = old_lv; in xfs_cil_prepare_item()
403 lv->lv_item->li_lv = lv; in xfs_cil_prepare_item()
411 if (!lv->lv_item->li_seq) in xfs_cil_prepare_item()
412 lv->lv_item->li_seq = log->l_cilp->xc_ctx->sequence; in xfs_cil_prepare_item()
425 * dependent on the current state of the vector in the CIL - the shadow lv is
427 * use that if we can't reuse the existing lv. If we can't reuse the existing
428 * lv, then simple swap it out for the shadow lv. We don't free it - that is
458 struct xfs_log_vec *lv; in xlog_cil_insert_format_items() local
469 * the shadow lv on the log item. in xlog_cil_insert_format_items()
483 lv = lip->li_lv; in xlog_cil_insert_format_items()
492 *diff_len -= lv->lv_bytes; in xlog_cil_insert_format_items()
494 /* Ensure the lv is set up according to ->iop_size */ in xlog_cil_insert_format_items()
495 lv->lv_niovecs = shadow->lv_niovecs; in xlog_cil_insert_format_items()
497 /* reset the lv buffer information for new formatting */ in xlog_cil_insert_format_items()
498 lv->lv_buf_len = 0; in xlog_cil_insert_format_items()
499 lv->lv_bytes = 0; in xlog_cil_insert_format_items()
500 lv->lv_buf = (char *)lv + in xlog_cil_insert_format_items()
501 xlog_cil_iovec_space(lv->lv_niovecs); in xlog_cil_insert_format_items()
504 lv = shadow; in xlog_cil_insert_format_items()
505 lv->lv_item = lip; in xlog_cil_insert_format_items()
513 ASSERT(IS_ALIGNED((unsigned long)lv->lv_buf, sizeof(uint64_t))); in xlog_cil_insert_format_items()
514 lip->li_ops->iop_format(lip, lv); in xlog_cil_insert_format_items()
516 xfs_cil_prepare_item(log, lv, old_lv, diff_len); in xlog_cil_insert_format_items()
690 struct xfs_log_vec *lv; in xlog_cil_free_logvec() local
693 lv = list_first_entry(lv_chain, struct xfs_log_vec, lv_list); in xlog_cil_free_logvec()
694 list_del_init(&lv->lv_list); in xlog_cil_free_logvec()
695 kmem_free(lv); in xlog_cil_free_logvec()
1122 struct xfs_log_vec *lv; in xlog_cil_build_lv_chain() local
1133 lv = item->li_lv; in xlog_cil_build_lv_chain()
1134 lv->lv_order_id = item->li_order_id; in xlog_cil_build_lv_chain()
1137 if (lv->lv_buf_len != XFS_LOG_VEC_ORDERED) in xlog_cil_build_lv_chain()
1138 *num_bytes += lv->lv_bytes; in xlog_cil_build_lv_chain()
1139 *num_iovecs += lv->lv_niovecs; in xlog_cil_build_lv_chain()
1140 list_add_tail(&lv->lv_list, &ctx->lv_chain); in xlog_cil_build_lv_chain()
1306 * Add the lvhdr to the head of the lv chain we pass to xlog_write() so in xlog_cil_push_work()