Commit 0f22f9d0 authored by Mark Tinguely's avatar Mark Tinguely Committed by Ben Myers

xfs: rename bli_format to avoid confusion with bli_formats

Rename the bli_format structure to __bli_format to avoid
accidently confusing them with the bli_formats pointer.
Signed-off-by: default avatarMark Tinguely <tinguely@sgi.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent d44d9bc6
...@@ -71,7 +71,7 @@ xfs_buf_item_log_debug( ...@@ -71,7 +71,7 @@ xfs_buf_item_log_debug(
chunk_num = byte >> XFS_BLF_SHIFT; chunk_num = byte >> XFS_BLF_SHIFT;
word_num = chunk_num >> BIT_TO_WORD_SHIFT; word_num = chunk_num >> BIT_TO_WORD_SHIFT;
bit_num = chunk_num & (NBWORD - 1); bit_num = chunk_num & (NBWORD - 1);
wordp = &(bip->bli_format.blf_data_map[word_num]); wordp = &(bip->__bli_format.blf_data_map[word_num]);
bit_set = *wordp & (1 << bit_num); bit_set = *wordp & (1 << bit_num);
ASSERT(bit_set); ASSERT(bit_set);
byte++; byte++;
...@@ -237,7 +237,7 @@ xfs_buf_item_size( ...@@ -237,7 +237,7 @@ xfs_buf_item_size(
* cancel flag in it. * cancel flag in it.
*/ */
trace_xfs_buf_item_size_stale(bip); trace_xfs_buf_item_size_stale(bip);
ASSERT(bip->bli_format.blf_flags & XFS_BLF_CANCEL); ASSERT(bip->__bli_format.blf_flags & XFS_BLF_CANCEL);
return bip->bli_format_count; return bip->bli_format_count;
} }
...@@ -278,7 +278,7 @@ xfs_buf_item_format_segment( ...@@ -278,7 +278,7 @@ xfs_buf_item_format_segment(
uint buffer_offset; uint buffer_offset;
/* copy the flags across from the base format item */ /* copy the flags across from the base format item */
blfp->blf_flags = bip->bli_format.blf_flags; blfp->blf_flags = bip->__bli_format.blf_flags;
/* /*
* Base size is the actual size of the ondisk structure - it reflects * Base size is the actual size of the ondisk structure - it reflects
...@@ -371,7 +371,7 @@ xfs_buf_item_format_segment( ...@@ -371,7 +371,7 @@ xfs_buf_item_format_segment(
nbits++; nbits++;
} }
} }
bip->bli_format.blf_size = nvecs; bip->__bli_format.blf_size = nvecs;
return vecp; return vecp;
} }
...@@ -405,7 +405,7 @@ xfs_buf_item_format( ...@@ -405,7 +405,7 @@ xfs_buf_item_format(
if (bip->bli_flags & XFS_BLI_INODE_BUF) { if (bip->bli_flags & XFS_BLI_INODE_BUF) {
if (!((bip->bli_flags & XFS_BLI_INODE_ALLOC_BUF) && if (!((bip->bli_flags & XFS_BLI_INODE_ALLOC_BUF) &&
xfs_log_item_in_current_chkpt(lip))) xfs_log_item_in_current_chkpt(lip)))
bip->bli_format.blf_flags |= XFS_BLF_INODE_BUF; bip->__bli_format.blf_flags |= XFS_BLF_INODE_BUF;
bip->bli_flags &= ~XFS_BLI_INODE_BUF; bip->bli_flags &= ~XFS_BLI_INODE_BUF;
} }
...@@ -485,7 +485,7 @@ xfs_buf_item_unpin( ...@@ -485,7 +485,7 @@ xfs_buf_item_unpin(
ASSERT(bip->bli_flags & XFS_BLI_STALE); ASSERT(bip->bli_flags & XFS_BLI_STALE);
ASSERT(xfs_buf_islocked(bp)); ASSERT(xfs_buf_islocked(bp));
ASSERT(XFS_BUF_ISSTALE(bp)); ASSERT(XFS_BUF_ISSTALE(bp));
ASSERT(bip->bli_format.blf_flags & XFS_BLF_CANCEL); ASSERT(bip->__bli_format.blf_flags & XFS_BLF_CANCEL);
trace_xfs_buf_item_unpin_stale(bip); trace_xfs_buf_item_unpin_stale(bip);
...@@ -631,7 +631,7 @@ xfs_buf_item_unlock( ...@@ -631,7 +631,7 @@ xfs_buf_item_unlock(
*/ */
if (bip->bli_flags & XFS_BLI_STALE) { if (bip->bli_flags & XFS_BLI_STALE) {
trace_xfs_buf_item_unlock_stale(bip); trace_xfs_buf_item_unlock_stale(bip);
ASSERT(bip->bli_format.blf_flags & XFS_BLF_CANCEL); ASSERT(bip->__bli_format.blf_flags & XFS_BLF_CANCEL);
if (!aborted) { if (!aborted) {
atomic_dec(&bip->bli_refcount); atomic_dec(&bip->bli_refcount);
return; return;
...@@ -644,8 +644,8 @@ xfs_buf_item_unlock( ...@@ -644,8 +644,8 @@ xfs_buf_item_unlock(
* If the buf item isn't tracking any data, free it, otherwise drop the * If the buf item isn't tracking any data, free it, otherwise drop the
* reference we hold to it. * reference we hold to it.
*/ */
if (xfs_bitmap_empty(bip->bli_format.blf_data_map, if (xfs_bitmap_empty(bip->__bli_format.blf_data_map,
bip->bli_format.blf_map_size)) bip->__bli_format.blf_map_size))
xfs_buf_item_relse(bp); xfs_buf_item_relse(bp);
else else
atomic_dec(&bip->bli_refcount); atomic_dec(&bip->bli_refcount);
...@@ -716,7 +716,7 @@ xfs_buf_item_get_format( ...@@ -716,7 +716,7 @@ xfs_buf_item_get_format(
bip->bli_format_count = count; bip->bli_format_count = count;
if (count == 1) { if (count == 1) {
bip->bli_formats = &bip->bli_format; bip->bli_formats = &bip->__bli_format;
return 0; return 0;
} }
...@@ -731,7 +731,7 @@ STATIC void ...@@ -731,7 +731,7 @@ STATIC void
xfs_buf_item_free_format( xfs_buf_item_free_format(
struct xfs_buf_log_item *bip) struct xfs_buf_log_item *bip)
{ {
if (bip->bli_formats != &bip->bli_format) { if (bip->bli_formats != &bip->__bli_format) {
kmem_free(bip->bli_formats); kmem_free(bip->bli_formats);
bip->bli_formats = NULL; bip->bli_formats = NULL;
} }
......
...@@ -104,7 +104,7 @@ typedef struct xfs_buf_log_item { ...@@ -104,7 +104,7 @@ typedef struct xfs_buf_log_item {
#endif #endif
int bli_format_count; /* count of headers */ int bli_format_count; /* count of headers */
struct xfs_buf_log_format *bli_formats; /* array of in-log header ptrs */ struct xfs_buf_log_format *bli_formats; /* array of in-log header ptrs */
struct xfs_buf_log_format bli_format; /* embedded in-log header */ struct xfs_buf_log_format __bli_format; /* embedded in-log header */
} xfs_buf_log_item_t; } xfs_buf_log_item_t;
void xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *); void xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *);
......
...@@ -93,7 +93,7 @@ _xfs_trans_bjoin( ...@@ -93,7 +93,7 @@ _xfs_trans_bjoin(
xfs_buf_item_init(bp, tp->t_mountp); xfs_buf_item_init(bp, tp->t_mountp);
bip = bp->b_fspriv; bip = bp->b_fspriv;
ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); ASSERT(!(bip->bli_flags & XFS_BLI_STALE));
ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_CANCEL)); ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL));
ASSERT(!(bip->bli_flags & XFS_BLI_LOGGED)); ASSERT(!(bip->bli_flags & XFS_BLI_LOGGED));
if (reset_recur) if (reset_recur)
bip->bli_recur = 0; bip->bli_recur = 0;
...@@ -432,7 +432,7 @@ xfs_trans_brelse(xfs_trans_t *tp, ...@@ -432,7 +432,7 @@ xfs_trans_brelse(xfs_trans_t *tp,
bip = bp->b_fspriv; bip = bp->b_fspriv;
ASSERT(bip->bli_item.li_type == XFS_LI_BUF); ASSERT(bip->bli_item.li_type == XFS_LI_BUF);
ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); ASSERT(!(bip->bli_flags & XFS_BLI_STALE));
ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_CANCEL)); ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL));
ASSERT(atomic_read(&bip->bli_refcount) > 0); ASSERT(atomic_read(&bip->bli_refcount) > 0);
trace_xfs_trans_brelse(bip); trace_xfs_trans_brelse(bip);
...@@ -519,7 +519,7 @@ xfs_trans_bhold(xfs_trans_t *tp, ...@@ -519,7 +519,7 @@ xfs_trans_bhold(xfs_trans_t *tp,
ASSERT(bp->b_transp == tp); ASSERT(bp->b_transp == tp);
ASSERT(bip != NULL); ASSERT(bip != NULL);
ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); ASSERT(!(bip->bli_flags & XFS_BLI_STALE));
ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_CANCEL)); ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL));
ASSERT(atomic_read(&bip->bli_refcount) > 0); ASSERT(atomic_read(&bip->bli_refcount) > 0);
bip->bli_flags |= XFS_BLI_HOLD; bip->bli_flags |= XFS_BLI_HOLD;
...@@ -539,7 +539,7 @@ xfs_trans_bhold_release(xfs_trans_t *tp, ...@@ -539,7 +539,7 @@ xfs_trans_bhold_release(xfs_trans_t *tp,
ASSERT(bp->b_transp == tp); ASSERT(bp->b_transp == tp);
ASSERT(bip != NULL); ASSERT(bip != NULL);
ASSERT(!(bip->bli_flags & XFS_BLI_STALE)); ASSERT(!(bip->bli_flags & XFS_BLI_STALE));
ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_CANCEL)); ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_CANCEL));
ASSERT(atomic_read(&bip->bli_refcount) > 0); ASSERT(atomic_read(&bip->bli_refcount) > 0);
ASSERT(bip->bli_flags & XFS_BLI_HOLD); ASSERT(bip->bli_flags & XFS_BLI_HOLD);
...@@ -598,7 +598,7 @@ xfs_trans_log_buf(xfs_trans_t *tp, ...@@ -598,7 +598,7 @@ xfs_trans_log_buf(xfs_trans_t *tp,
bip->bli_flags &= ~XFS_BLI_STALE; bip->bli_flags &= ~XFS_BLI_STALE;
ASSERT(XFS_BUF_ISSTALE(bp)); ASSERT(XFS_BUF_ISSTALE(bp));
XFS_BUF_UNSTALE(bp); XFS_BUF_UNSTALE(bp);
bip->bli_format.blf_flags &= ~XFS_BLF_CANCEL; bip->__bli_format.blf_flags &= ~XFS_BLF_CANCEL;
} }
tp->t_flags |= XFS_TRANS_DIRTY; tp->t_flags |= XFS_TRANS_DIRTY;
...@@ -657,8 +657,8 @@ xfs_trans_binval( ...@@ -657,8 +657,8 @@ xfs_trans_binval(
*/ */
ASSERT(XFS_BUF_ISSTALE(bp)); ASSERT(XFS_BUF_ISSTALE(bp));
ASSERT(!(bip->bli_flags & (XFS_BLI_LOGGED | XFS_BLI_DIRTY))); ASSERT(!(bip->bli_flags & (XFS_BLI_LOGGED | XFS_BLI_DIRTY)));
ASSERT(!(bip->bli_format.blf_flags & XFS_BLF_INODE_BUF)); ASSERT(!(bip->__bli_format.blf_flags & XFS_BLF_INODE_BUF));
ASSERT(bip->bli_format.blf_flags & XFS_BLF_CANCEL); ASSERT(bip->__bli_format.blf_flags & XFS_BLF_CANCEL);
ASSERT(bip->bli_item.li_desc->lid_flags & XFS_LID_DIRTY); ASSERT(bip->bli_item.li_desc->lid_flags & XFS_LID_DIRTY);
ASSERT(tp->t_flags & XFS_TRANS_DIRTY); ASSERT(tp->t_flags & XFS_TRANS_DIRTY);
return; return;
...@@ -668,10 +668,10 @@ xfs_trans_binval( ...@@ -668,10 +668,10 @@ xfs_trans_binval(
bip->bli_flags |= XFS_BLI_STALE; bip->bli_flags |= XFS_BLI_STALE;
bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY); bip->bli_flags &= ~(XFS_BLI_INODE_BUF | XFS_BLI_LOGGED | XFS_BLI_DIRTY);
bip->bli_format.blf_flags &= ~XFS_BLF_INODE_BUF; bip->__bli_format.blf_flags &= ~XFS_BLF_INODE_BUF;
bip->bli_format.blf_flags |= XFS_BLF_CANCEL; bip->__bli_format.blf_flags |= XFS_BLF_CANCEL;
memset((char *)(bip->bli_format.blf_data_map), 0, memset((char *)(bip->__bli_format.blf_data_map), 0,
(bip->bli_format.blf_map_size * sizeof(uint))); (bip->__bli_format.blf_map_size * sizeof(uint)));
bip->bli_item.li_desc->lid_flags |= XFS_LID_DIRTY; bip->bli_item.li_desc->lid_flags |= XFS_LID_DIRTY;
tp->t_flags |= XFS_TRANS_DIRTY; tp->t_flags |= XFS_TRANS_DIRTY;
} }
...@@ -775,5 +775,5 @@ xfs_trans_dquot_buf( ...@@ -775,5 +775,5 @@ xfs_trans_dquot_buf(
type == XFS_BLF_GDQUOT_BUF); type == XFS_BLF_GDQUOT_BUF);
ASSERT(atomic_read(&bip->bli_refcount) > 0); ASSERT(atomic_read(&bip->bli_refcount) > 0);
bip->bli_format.blf_flags |= type; bip->__bli_format.blf_flags |= type;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment