diff options
author | Christoph Hellwig <hch@lst.de> | 2023-12-13 12:06:33 +0300 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2023-12-14 08:43:52 +0300 |
commit | 603ce8ab12094a2d9483c79a7541335e258a5328 (patch) | |
tree | 70458c6415e296b9e6f9a5a42012fd8374dd7d6c /fs/xfs/libxfs/xfs_defer.h | |
parent | dc22af64368291a86fb6b7eb2adab21c815836b7 (diff) | |
download | linux-603ce8ab12094a2d9483c79a7541335e258a5328.tar.xz |
xfs: pass the defer ops directly to xfs_defer_add
Pass a pointer to the xfs_defer_op_type structure to xfs_defer_add and
remove the indirection through the xfs_defer_ops_type enum and a global
table of all possible operations.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_defer.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_defer.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/fs/xfs/libxfs/xfs_defer.h b/fs/xfs/libxfs/xfs_defer.h index 60de91b66392..18a9fb92dde8 100644 --- a/fs/xfs/libxfs/xfs_defer.h +++ b/fs/xfs/libxfs/xfs_defer.h @@ -11,20 +11,6 @@ struct xfs_defer_op_type; struct xfs_defer_capture; /* - * Header for deferred operation list. - */ -enum xfs_defer_ops_type { - XFS_DEFER_OPS_TYPE_BMAP, - XFS_DEFER_OPS_TYPE_REFCOUNT, - XFS_DEFER_OPS_TYPE_RMAP, - XFS_DEFER_OPS_TYPE_FREE, - XFS_DEFER_OPS_TYPE_AGFL_FREE, - XFS_DEFER_OPS_TYPE_ATTR, - XFS_DEFER_OPS_TYPE_BARRIER, - XFS_DEFER_OPS_TYPE_MAX, -}; - -/* * Save a log intent item and a list of extents, so that we can replay * whatever action had to happen to the extent list and file the log done * item. @@ -51,8 +37,8 @@ struct xfs_defer_pending { void xfs_defer_item_pause(struct xfs_trans *tp, struct xfs_defer_pending *dfp); void xfs_defer_item_unpause(struct xfs_trans *tp, struct xfs_defer_pending *dfp); -struct xfs_defer_pending *xfs_defer_add(struct xfs_trans *tp, - enum xfs_defer_ops_type type, struct list_head *h); +struct xfs_defer_pending *xfs_defer_add(struct xfs_trans *tp, struct list_head *h, + const struct xfs_defer_op_type *ops); int xfs_defer_finish_noroll(struct xfs_trans **tp); int xfs_defer_finish(struct xfs_trans **tp); int xfs_defer_finish_one(struct xfs_trans *tp, struct xfs_defer_pending *dfp); |