xfs: return log item size in IOP_SIZE
To begin optimising the CIL commit process, we need to have IOP_SIZE return both the number of vectors and the size of the data pointed to by the vectors. This enables us to calculate the size ofthe memory allocation needed before the formatting step and reduces the number of memory allocations per item by one. While there, kill the IOP_SIZE macro. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:
@@ -40,11 +40,14 @@ static inline struct xfs_icreate_item *ICR_ITEM(struct xfs_log_item *lip)
|
||||
*
|
||||
* We only need one iovec for the icreate log structure.
|
||||
*/
|
||||
STATIC uint
|
||||
STATIC void
|
||||
xfs_icreate_item_size(
|
||||
struct xfs_log_item *lip)
|
||||
struct xfs_log_item *lip,
|
||||
int *nvecs,
|
||||
int *nbytes)
|
||||
{
|
||||
return 1;
|
||||
*nvecs += 1;
|
||||
*nbytes += sizeof(struct xfs_icreate_log);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user