xfs_extent_free_create_intent(
struct xfs_trans *tp,
struct list_head *items,
- unsigned int count)
+ unsigned int count,
+ bool sort)
{
+ struct xfs_mount *mp = tp->t_mountp;
+
+ if (sort)
+ list_sort(mp, items, xfs_extent_free_diff_items);
return NULL;
}
}
const struct xfs_defer_op_type xfs_extent_free_defer_type = {
- .diff_items = xfs_extent_free_diff_items,
.create_intent = xfs_extent_free_create_intent,
.abort_intent = xfs_extent_free_abort_intent,
.create_done = xfs_extent_free_create_done,
/* sub-type with special handling for AGFL deferred frees */
const struct xfs_defer_op_type xfs_agfl_free_defer_type = {
- .diff_items = xfs_extent_free_diff_items,
.create_intent = xfs_extent_free_create_intent,
.abort_intent = xfs_extent_free_abort_intent,
.create_done = xfs_extent_free_create_done,
xfs_rmap_update_create_intent(
struct xfs_trans *tp,
struct list_head *items,
- unsigned int count)
+ unsigned int count,
+ bool sort)
{
+ struct xfs_mount *mp = tp->t_mountp;
+
+ if (sort)
+ list_sort(mp, items, xfs_rmap_update_diff_items);
return NULL;
}
}
const struct xfs_defer_op_type xfs_rmap_update_defer_type = {
- .diff_items = xfs_rmap_update_diff_items,
.create_intent = xfs_rmap_update_create_intent,
.abort_intent = xfs_rmap_update_abort_intent,
.create_done = xfs_rmap_update_create_done,
xfs_refcount_update_create_intent(
struct xfs_trans *tp,
struct list_head *items,
- unsigned int count)
+ unsigned int count,
+ bool sort)
{
+ struct xfs_mount *mp = tp->t_mountp;
+
+ if (sort)
+ list_sort(mp, items, xfs_refcount_update_diff_items);
return NULL;
}
}
const struct xfs_defer_op_type xfs_refcount_update_defer_type = {
- .diff_items = xfs_refcount_update_diff_items,
.create_intent = xfs_refcount_update_create_intent,
.abort_intent = xfs_refcount_update_abort_intent,
.create_done = xfs_refcount_update_create_done,
xfs_bmap_update_create_intent(
struct xfs_trans *tp,
struct list_head *items,
- unsigned int count)
+ unsigned int count,
+ bool sort)
{
+ struct xfs_mount *mp = tp->t_mountp;
+
+ if (sort)
+ list_sort(mp, items, xfs_bmap_update_diff_items);
return NULL;
}
}
const struct xfs_defer_op_type xfs_bmap_update_defer_type = {
- .diff_items = xfs_bmap_update_diff_items,
.create_intent = xfs_bmap_update_create_intent,
.abort_intent = xfs_bmap_update_abort_intent,
.create_done = xfs_bmap_update_create_done,