diff options
author | Dave Chinner <dchinner@redhat.com> | 2013-08-12 20:50:05 +1000 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2013-08-13 16:12:30 -0500 |
commit | 7492c5b42de857c13d8b7e0dafb2a5e331598e00 (patch) | |
tree | 95a073b09c3ec9105bb33d1ee0cbbe28f2f78f9c /fs/xfs/xfs_log.h | |
parent | 166d13688a0e2d0aa379e259af8e2ee6a401de9a (diff) | |
download | linux-7492c5b42de857c13d8b7e0dafb2a5e331598e00.tar.bz2 |
xfs: Reduce allocations during CIL insertion
Now that we have the size of the object before the formatting pass
is called, we can allocation the log vector and it's buffer in a
single allocation rather than two separate allocations.
Store the size of the allocated buffer in the log vector so that
we potentially avoid allocation for future modifications of the
object.
While touching this code, remove the IOP_FORMAT definition.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_log.h')
-rw-r--r-- | fs/xfs/xfs_log.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_log.h b/fs/xfs/xfs_log.h index e63d9e10bd69..1c458487f000 100644 --- a/fs/xfs/xfs_log.h +++ b/fs/xfs/xfs_log.h @@ -27,6 +27,7 @@ struct xfs_log_vec { struct xfs_log_item *lv_item; /* owner */ char *lv_buf; /* formatted buffer */ int lv_buf_len; /* size of formatted buffer */ + int lv_size; /* size of allocated lv */ }; #define XFS_LOG_VEC_ORDERED (-1) |