diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-09-19 10:24:27 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-09-19 10:24:27 +1000 |
commit | cd00158ce34d6e2c42d8892e8499779b8ac1d2bf (patch) | |
tree | d35fb35e93820365979f4c8f8f293ab5d354b439 /fs/xfs/xfs_rmap_item.h | |
parent | ea78d80866ce375defb2fdd1c8a3aafec95e0f85 (diff) | |
download | linux-cd00158ce34d6e2c42d8892e8499779b8ac1d2bf.tar.bz2 |
xfs: convert RUI log formats to use variable length arrays
Use variable length array declarations for RUI log items,
and replace the open coded sizeof formulae with a single function.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_rmap_item.h')
-rw-r--r-- | fs/xfs/xfs_rmap_item.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/xfs/xfs_rmap_item.h b/fs/xfs/xfs_rmap_item.h index aefcc3a318a5..340c968e1f9c 100644 --- a/fs/xfs/xfs_rmap_item.h +++ b/fs/xfs/xfs_rmap_item.h @@ -70,6 +70,14 @@ struct xfs_rui_log_item { struct xfs_rui_log_format rui_format; }; +static inline size_t +xfs_rui_log_item_sizeof( + unsigned int nr) +{ + return offsetof(struct xfs_rui_log_item, rui_format) + + xfs_rui_log_format_sizeof(nr); +} + /* * This is the "rmap update done" log item. It is used to log the fact that * some rmapbt updates mentioned in an earlier rui item have been performed. |