@@ -275,7 +275,7 @@ xlog_cil_alloc_shadow_bufs(
275275 struct xfs_log_vec * lv ;
276276 int niovecs = 0 ;
277277 int nbytes = 0 ;
278- int buf_size ;
278+ int alloc_size ;
279279 bool ordered = false;
280280
281281 /* Skip items which aren't dirty in this transaction. */
@@ -316,14 +316,14 @@ xlog_cil_alloc_shadow_bufs(
316316 * that space to ensure we can align it appropriately and not
317317 * overrun the buffer.
318318 */
319- buf_size = nbytes + xlog_cil_iovec_space (niovecs );
319+ alloc_size = nbytes + xlog_cil_iovec_space (niovecs );
320320
321321 /*
322322 * if we have no shadow buffer, or it is too small, we need to
323323 * reallocate it.
324324 */
325325 if (!lip -> li_lv_shadow ||
326- buf_size > lip -> li_lv_shadow -> lv_size ) {
326+ alloc_size > lip -> li_lv_shadow -> lv_alloc_size ) {
327327 /*
328328 * We free and allocate here as a realloc would copy
329329 * unnecessary data. We don't use kvzalloc() for the
@@ -332,25 +332,25 @@ xlog_cil_alloc_shadow_bufs(
332332 * storage.
333333 */
334334 kvfree (lip -> li_lv_shadow );
335- lv = xlog_kvmalloc (buf_size );
335+ lv = xlog_kvmalloc (alloc_size );
336336
337337 memset (lv , 0 , xlog_cil_iovec_space (niovecs ));
338338
339339 INIT_LIST_HEAD (& lv -> lv_list );
340340 lv -> lv_item = lip ;
341- lv -> lv_size = buf_size ;
341+ lv -> lv_alloc_size = alloc_size ;
342342 if (ordered )
343- lv -> lv_buf_len = XFS_LOG_VEC_ORDERED ;
343+ lv -> lv_buf_used = XFS_LOG_VEC_ORDERED ;
344344 else
345345 lv -> lv_iovecp = (struct xfs_log_iovec * )& lv [1 ];
346346 lip -> li_lv_shadow = lv ;
347347 } else {
348348 /* same or smaller, optimise common overwrite case */
349349 lv = lip -> li_lv_shadow ;
350350 if (ordered )
351- lv -> lv_buf_len = XFS_LOG_VEC_ORDERED ;
351+ lv -> lv_buf_used = XFS_LOG_VEC_ORDERED ;
352352 else
353- lv -> lv_buf_len = 0 ;
353+ lv -> lv_buf_used = 0 ;
354354 lv -> lv_bytes = 0 ;
355355 }
356356
@@ -375,7 +375,7 @@ xfs_cil_prepare_item(
375375 int * diff_len )
376376{
377377 /* Account for the new LV being passed in */
378- if (lv -> lv_buf_len != XFS_LOG_VEC_ORDERED )
378+ if (lv -> lv_buf_used != XFS_LOG_VEC_ORDERED )
379379 * diff_len += lv -> lv_bytes ;
380380
381381 /*
@@ -390,7 +390,7 @@ xfs_cil_prepare_item(
390390 lv -> lv_item -> li_ops -> iop_pin (lv -> lv_item );
391391 lv -> lv_item -> li_lv_shadow = NULL ;
392392 } else if (lip -> li_lv != lv ) {
393- ASSERT (lv -> lv_buf_len != XFS_LOG_VEC_ORDERED );
393+ ASSERT (lv -> lv_buf_used != XFS_LOG_VEC_ORDERED );
394394
395395 * diff_len -= lip -> li_lv -> lv_bytes ;
396396 lv -> lv_item -> li_lv_shadow = lip -> li_lv ;
@@ -463,12 +463,12 @@ xlog_cil_insert_format_items(
463463 * The formatting size information is already attached to
464464 * the shadow lv on the log item.
465465 */
466- if (shadow -> lv_buf_len == XFS_LOG_VEC_ORDERED ) {
466+ if (shadow -> lv_buf_used == XFS_LOG_VEC_ORDERED ) {
467467 if (!lv ) {
468468 lv = shadow ;
469469 lv -> lv_item = lip ;
470470 }
471- ASSERT (shadow -> lv_size == lv -> lv_size );
471+ ASSERT (shadow -> lv_alloc_size == lv -> lv_alloc_size );
472472 xfs_cil_prepare_item (log , lip , lv , diff_len );
473473 continue ;
474474 }
@@ -478,7 +478,7 @@ xlog_cil_insert_format_items(
478478 continue ;
479479
480480 /* compare to existing item size */
481- if (lv && shadow -> lv_size <= lv -> lv_size ) {
481+ if (lv && shadow -> lv_alloc_size <= lv -> lv_alloc_size ) {
482482 /* same or smaller, optimise common overwrite case */
483483
484484 /*
@@ -491,7 +491,7 @@ xlog_cil_insert_format_items(
491491 lv -> lv_niovecs = shadow -> lv_niovecs ;
492492
493493 /* reset the lv buffer information for new formatting */
494- lv -> lv_buf_len = 0 ;
494+ lv -> lv_buf_used = 0 ;
495495 lv -> lv_bytes = 0 ;
496496 lv -> lv_buf = (char * )lv +
497497 xlog_cil_iovec_space (lv -> lv_niovecs );
@@ -1238,7 +1238,7 @@ xlog_cil_build_lv_chain(
12381238 lv -> lv_order_id = item -> li_order_id ;
12391239
12401240 /* we don't write ordered log vectors */
1241- if (lv -> lv_buf_len != XFS_LOG_VEC_ORDERED )
1241+ if (lv -> lv_buf_used != XFS_LOG_VEC_ORDERED )
12421242 * num_bytes += lv -> lv_bytes ;
12431243 * num_iovecs += lv -> lv_niovecs ;
12441244 list_add_tail (& lv -> lv_list , & ctx -> lv_chain );
0 commit comments