Split buffer's b_fspriv field
By splitting the b_fspriv field into two different fields (b_log_item and b_li_list). It's possible to get rid of an old ABI workaround, by using the new b_log_item field to store xfs_buf_log_item separated from the log items attached to the buffer, which will be linked in the new b_li_list field. This way, there is no more need to reorder the log items list to place the buf_log_item at the beginning of the list, simplifying a bit the logic to handle buffer IO. This also opens the possibility to change buffer's log items list into a proper list_head. b_log_item field is still defined as a void *, because it is still used by the log buffers to store xlog_in_core structures, and there is no need to add an extra field on xfs_buf just for xlog_in_core. Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Bill O'Donnell <billodo@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> [darrick: minor style changes] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
70a2065533
commit
fb1755a645
@@ -400,9 +400,9 @@ xlog_recover_iodone(
|
||||
* On v5 supers, a bli could be attached to update the metadata LSN.
|
||||
* Clean it up.
|
||||
*/
|
||||
if (bp->b_fspriv)
|
||||
if (bp->b_log_item)
|
||||
xfs_buf_item_relse(bp);
|
||||
ASSERT(bp->b_fspriv == NULL);
|
||||
ASSERT(bp->b_log_item == NULL);
|
||||
|
||||
bp->b_iodone = NULL;
|
||||
xfs_buf_ioend(bp);
|
||||
@@ -2630,7 +2630,7 @@ xlog_recover_validate_buf_type(
|
||||
ASSERT(!bp->b_iodone || bp->b_iodone == xlog_recover_iodone);
|
||||
bp->b_iodone = xlog_recover_iodone;
|
||||
xfs_buf_item_init(bp, mp);
|
||||
bip = bp->b_fspriv;
|
||||
bip = bp->b_log_item;
|
||||
bip->bli_item.li_lsn = current_lsn;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user