mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 16:30:52 +07:00
xfs: drop dop param from xfs_defer_op_type ->finish_item() callback
The dfops infrastructure ->finish_item() callback passes the transaction and dfops as separate parameters. Since dfops is always part of a transaction, the latter parameter is no longer necessary. Remove it from the various callbacks. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
parent
a8198666fb
commit
7dbddbaccd
@ -6045,7 +6045,6 @@ xfs_bmap_unmap_extent(
|
|||||||
int
|
int
|
||||||
xfs_bmap_finish_one(
|
xfs_bmap_finish_one(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_defer_ops *dfops,
|
|
||||||
struct xfs_inode *ip,
|
struct xfs_inode *ip,
|
||||||
enum xfs_bmap_intent_type type,
|
enum xfs_bmap_intent_type type,
|
||||||
int whichfork,
|
int whichfork,
|
||||||
@ -6072,7 +6071,6 @@ xfs_bmap_finish_one(
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case XFS_BMAP_MAP:
|
case XFS_BMAP_MAP:
|
||||||
ASSERT(dfops == tp->t_dfops);
|
|
||||||
error = xfs_bmapi_remap(tp, ip, startoff, *blockcount,
|
error = xfs_bmapi_remap(tp, ip, startoff, *blockcount,
|
||||||
startblock, 0);
|
startblock, 0);
|
||||||
*blockcount = 0;
|
*blockcount = 0;
|
||||||
|
@ -252,9 +252,9 @@ struct xfs_bmap_intent {
|
|||||||
struct xfs_bmbt_irec bi_bmap;
|
struct xfs_bmbt_irec bi_bmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
int xfs_bmap_finish_one(struct xfs_trans *tp, struct xfs_defer_ops *dfops,
|
int xfs_bmap_finish_one(struct xfs_trans *tp, struct xfs_inode *ip,
|
||||||
struct xfs_inode *ip, enum xfs_bmap_intent_type type,
|
enum xfs_bmap_intent_type type, int whichfork,
|
||||||
int whichfork, xfs_fileoff_t startoff, xfs_fsblock_t startblock,
|
xfs_fileoff_t startoff, xfs_fsblock_t startblock,
|
||||||
xfs_filblks_t *blockcount, xfs_exntst_t state);
|
xfs_filblks_t *blockcount, xfs_exntst_t state);
|
||||||
int xfs_bmap_map_extent(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
|
int xfs_bmap_map_extent(struct xfs_mount *mp, struct xfs_defer_ops *dfops,
|
||||||
struct xfs_inode *ip, struct xfs_bmbt_irec *imap);
|
struct xfs_inode *ip, struct xfs_bmbt_irec *imap);
|
||||||
|
@ -371,7 +371,7 @@ xfs_defer_finish_noroll(
|
|||||||
list_for_each_safe(li, n, &dfp->dfp_work) {
|
list_for_each_safe(li, n, &dfp->dfp_work) {
|
||||||
list_del(li);
|
list_del(li);
|
||||||
dfp->dfp_count--;
|
dfp->dfp_count--;
|
||||||
error = dfp->dfp_type->finish_item(*tp, dop, li,
|
error = dfp->dfp_type->finish_item(*tp, li,
|
||||||
dfp->dfp_done, &state);
|
dfp->dfp_done, &state);
|
||||||
if (error == -EAGAIN) {
|
if (error == -EAGAIN) {
|
||||||
/*
|
/*
|
||||||
|
@ -50,8 +50,8 @@ struct xfs_defer_op_type {
|
|||||||
unsigned int max_items;
|
unsigned int max_items;
|
||||||
void (*abort_intent)(void *);
|
void (*abort_intent)(void *);
|
||||||
void *(*create_done)(struct xfs_trans *, void *, unsigned int);
|
void *(*create_done)(struct xfs_trans *, void *, unsigned int);
|
||||||
int (*finish_item)(struct xfs_trans *, struct xfs_defer_ops *,
|
int (*finish_item)(struct xfs_trans *, struct list_head *, void *,
|
||||||
struct list_head *, void *, void **);
|
void **);
|
||||||
void (*finish_cleanup)(struct xfs_trans *, void *, int);
|
void (*finish_cleanup)(struct xfs_trans *, void *, int);
|
||||||
void (*cancel_item)(struct list_head *);
|
void (*cancel_item)(struct list_head *);
|
||||||
int (*diff_items)(void *, struct list_head *, struct list_head *);
|
int (*diff_items)(void *, struct list_head *, struct list_head *);
|
||||||
|
@ -1082,7 +1082,6 @@ xfs_refcount_finish_one_cleanup(
|
|||||||
int
|
int
|
||||||
xfs_refcount_finish_one(
|
xfs_refcount_finish_one(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_defer_ops *dfops,
|
|
||||||
enum xfs_refcount_intent_type type,
|
enum xfs_refcount_intent_type type,
|
||||||
xfs_fsblock_t startblock,
|
xfs_fsblock_t startblock,
|
||||||
xfs_extlen_t blockcount,
|
xfs_extlen_t blockcount,
|
||||||
@ -1091,6 +1090,7 @@ xfs_refcount_finish_one(
|
|||||||
struct xfs_btree_cur **pcur)
|
struct xfs_btree_cur **pcur)
|
||||||
{
|
{
|
||||||
struct xfs_mount *mp = tp->t_mountp;
|
struct xfs_mount *mp = tp->t_mountp;
|
||||||
|
struct xfs_defer_ops *dfops = tp->t_dfops;
|
||||||
struct xfs_btree_cur *rcur;
|
struct xfs_btree_cur *rcur;
|
||||||
struct xfs_buf *agbp = NULL;
|
struct xfs_buf *agbp = NULL;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
|
@ -37,10 +37,9 @@ extern int xfs_refcount_decrease_extent(struct xfs_mount *mp,
|
|||||||
extern void xfs_refcount_finish_one_cleanup(struct xfs_trans *tp,
|
extern void xfs_refcount_finish_one_cleanup(struct xfs_trans *tp,
|
||||||
struct xfs_btree_cur *rcur, int error);
|
struct xfs_btree_cur *rcur, int error);
|
||||||
extern int xfs_refcount_finish_one(struct xfs_trans *tp,
|
extern int xfs_refcount_finish_one(struct xfs_trans *tp,
|
||||||
struct xfs_defer_ops *dfops, enum xfs_refcount_intent_type type,
|
enum xfs_refcount_intent_type type, xfs_fsblock_t startblock,
|
||||||
xfs_fsblock_t startblock, xfs_extlen_t blockcount,
|
xfs_extlen_t blockcount, xfs_fsblock_t *new_fsb,
|
||||||
xfs_fsblock_t *new_fsb, xfs_extlen_t *new_len,
|
xfs_extlen_t *new_len, struct xfs_btree_cur **pcur);
|
||||||
struct xfs_btree_cur **pcur);
|
|
||||||
|
|
||||||
extern int xfs_refcount_find_shared(struct xfs_btree_cur *cur,
|
extern int xfs_refcount_find_shared(struct xfs_btree_cur *cur,
|
||||||
xfs_agblock_t agbno, xfs_extlen_t aglen, xfs_agblock_t *fbno,
|
xfs_agblock_t agbno, xfs_extlen_t aglen, xfs_agblock_t *fbno,
|
||||||
|
@ -475,9 +475,8 @@ xfs_bui_recover(
|
|||||||
xfs_trans_ijoin(tp, ip, 0);
|
xfs_trans_ijoin(tp, ip, 0);
|
||||||
|
|
||||||
count = bmap->me_len;
|
count = bmap->me_len;
|
||||||
error = xfs_trans_log_finish_bmap_update(tp, budp, tp->t_dfops, type,
|
error = xfs_trans_log_finish_bmap_update(tp, budp, type, ip, whichfork,
|
||||||
ip, whichfork, bmap->me_startoff,
|
bmap->me_startoff, bmap->me_startblock, &count, state);
|
||||||
bmap->me_startblock, &count, state);
|
|
||||||
if (error)
|
if (error)
|
||||||
goto err_inode;
|
goto err_inode;
|
||||||
|
|
||||||
|
@ -479,8 +479,8 @@ xfs_cui_recover(
|
|||||||
new_len = refc->pe_len;
|
new_len = refc->pe_len;
|
||||||
} else
|
} else
|
||||||
error = xfs_trans_log_finish_refcount_update(tp, cudp,
|
error = xfs_trans_log_finish_refcount_update(tp, cudp,
|
||||||
tp->t_dfops, type, refc->pe_startblock,
|
type, refc->pe_startblock, refc->pe_len,
|
||||||
refc->pe_len, &new_fsb, &new_len, &rcur);
|
&new_fsb, &new_len, &rcur);
|
||||||
if (error)
|
if (error)
|
||||||
goto abort_error;
|
goto abort_error;
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ void xfs_refcount_update_init_defer_op(void);
|
|||||||
struct xfs_cud_log_item *xfs_trans_get_cud(struct xfs_trans *tp,
|
struct xfs_cud_log_item *xfs_trans_get_cud(struct xfs_trans *tp,
|
||||||
struct xfs_cui_log_item *cuip);
|
struct xfs_cui_log_item *cuip);
|
||||||
int xfs_trans_log_finish_refcount_update(struct xfs_trans *tp,
|
int xfs_trans_log_finish_refcount_update(struct xfs_trans *tp,
|
||||||
struct xfs_cud_log_item *cudp, struct xfs_defer_ops *dfops,
|
struct xfs_cud_log_item *cudp,
|
||||||
enum xfs_refcount_intent_type type, xfs_fsblock_t startblock,
|
enum xfs_refcount_intent_type type, xfs_fsblock_t startblock,
|
||||||
xfs_extlen_t blockcount, xfs_fsblock_t *new_fsb,
|
xfs_extlen_t blockcount, xfs_fsblock_t *new_fsb,
|
||||||
xfs_extlen_t *new_len, struct xfs_btree_cur **pcur);
|
xfs_extlen_t *new_len, struct xfs_btree_cur **pcur);
|
||||||
@ -280,9 +280,9 @@ void xfs_bmap_update_init_defer_op(void);
|
|||||||
struct xfs_bud_log_item *xfs_trans_get_bud(struct xfs_trans *tp,
|
struct xfs_bud_log_item *xfs_trans_get_bud(struct xfs_trans *tp,
|
||||||
struct xfs_bui_log_item *buip);
|
struct xfs_bui_log_item *buip);
|
||||||
int xfs_trans_log_finish_bmap_update(struct xfs_trans *tp,
|
int xfs_trans_log_finish_bmap_update(struct xfs_trans *tp,
|
||||||
struct xfs_bud_log_item *rudp, struct xfs_defer_ops *dfops,
|
struct xfs_bud_log_item *rudp, enum xfs_bmap_intent_type type,
|
||||||
enum xfs_bmap_intent_type type, struct xfs_inode *ip,
|
struct xfs_inode *ip, int whichfork, xfs_fileoff_t startoff,
|
||||||
int whichfork, xfs_fileoff_t startoff, xfs_fsblock_t startblock,
|
xfs_fsblock_t startblock, xfs_filblks_t *blockcount,
|
||||||
xfs_filblks_t *blockcount, xfs_exntst_t state);
|
xfs_exntst_t state);
|
||||||
|
|
||||||
#endif /* __XFS_TRANS_H__ */
|
#endif /* __XFS_TRANS_H__ */
|
||||||
|
@ -43,7 +43,6 @@ int
|
|||||||
xfs_trans_log_finish_bmap_update(
|
xfs_trans_log_finish_bmap_update(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_bud_log_item *budp,
|
struct xfs_bud_log_item *budp,
|
||||||
struct xfs_defer_ops *dop,
|
|
||||||
enum xfs_bmap_intent_type type,
|
enum xfs_bmap_intent_type type,
|
||||||
struct xfs_inode *ip,
|
struct xfs_inode *ip,
|
||||||
int whichfork,
|
int whichfork,
|
||||||
@ -54,7 +53,7 @@ xfs_trans_log_finish_bmap_update(
|
|||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = xfs_bmap_finish_one(tp, dop, ip, type, whichfork, startoff,
|
error = xfs_bmap_finish_one(tp, ip, type, whichfork, startoff,
|
||||||
startblock, blockcount, state);
|
startblock, blockcount, state);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -176,7 +175,6 @@ xfs_bmap_update_create_done(
|
|||||||
STATIC int
|
STATIC int
|
||||||
xfs_bmap_update_finish_item(
|
xfs_bmap_update_finish_item(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_defer_ops *dop,
|
|
||||||
struct list_head *item,
|
struct list_head *item,
|
||||||
void *done_item,
|
void *done_item,
|
||||||
void **state)
|
void **state)
|
||||||
@ -187,7 +185,7 @@ xfs_bmap_update_finish_item(
|
|||||||
|
|
||||||
bmap = container_of(item, struct xfs_bmap_intent, bi_list);
|
bmap = container_of(item, struct xfs_bmap_intent, bi_list);
|
||||||
count = bmap->bi_bmap.br_blockcount;
|
count = bmap->bi_bmap.br_blockcount;
|
||||||
error = xfs_trans_log_finish_bmap_update(tp, done_item, dop,
|
error = xfs_trans_log_finish_bmap_update(tp, done_item,
|
||||||
bmap->bi_type,
|
bmap->bi_type,
|
||||||
bmap->bi_owner, bmap->bi_whichfork,
|
bmap->bi_owner, bmap->bi_whichfork,
|
||||||
bmap->bi_bmap.br_startoff,
|
bmap->bi_bmap.br_startoff,
|
||||||
|
@ -171,7 +171,6 @@ xfs_extent_free_create_done(
|
|||||||
STATIC int
|
STATIC int
|
||||||
xfs_extent_free_finish_item(
|
xfs_extent_free_finish_item(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_defer_ops *dop,
|
|
||||||
struct list_head *item,
|
struct list_head *item,
|
||||||
void *done_item,
|
void *done_item,
|
||||||
void **state)
|
void **state)
|
||||||
@ -226,7 +225,6 @@ static const struct xfs_defer_op_type xfs_extent_free_defer_type = {
|
|||||||
STATIC int
|
STATIC int
|
||||||
xfs_agfl_free_finish_item(
|
xfs_agfl_free_finish_item(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_defer_ops *dop,
|
|
||||||
struct list_head *item,
|
struct list_head *item,
|
||||||
void *done_item,
|
void *done_item,
|
||||||
void **state)
|
void **state)
|
||||||
|
@ -42,7 +42,6 @@ int
|
|||||||
xfs_trans_log_finish_refcount_update(
|
xfs_trans_log_finish_refcount_update(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_cud_log_item *cudp,
|
struct xfs_cud_log_item *cudp,
|
||||||
struct xfs_defer_ops *dop,
|
|
||||||
enum xfs_refcount_intent_type type,
|
enum xfs_refcount_intent_type type,
|
||||||
xfs_fsblock_t startblock,
|
xfs_fsblock_t startblock,
|
||||||
xfs_extlen_t blockcount,
|
xfs_extlen_t blockcount,
|
||||||
@ -52,7 +51,7 @@ xfs_trans_log_finish_refcount_update(
|
|||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
error = xfs_refcount_finish_one(tp, dop, type, startblock,
|
error = xfs_refcount_finish_one(tp, type, startblock,
|
||||||
blockcount, new_fsb, new_len, pcur);
|
blockcount, new_fsb, new_len, pcur);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -169,7 +168,6 @@ xfs_refcount_update_create_done(
|
|||||||
STATIC int
|
STATIC int
|
||||||
xfs_refcount_update_finish_item(
|
xfs_refcount_update_finish_item(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_defer_ops *dop,
|
|
||||||
struct list_head *item,
|
struct list_head *item,
|
||||||
void *done_item,
|
void *done_item,
|
||||||
void **state)
|
void **state)
|
||||||
@ -180,7 +178,7 @@ xfs_refcount_update_finish_item(
|
|||||||
int error;
|
int error;
|
||||||
|
|
||||||
refc = container_of(item, struct xfs_refcount_intent, ri_list);
|
refc = container_of(item, struct xfs_refcount_intent, ri_list);
|
||||||
error = xfs_trans_log_finish_refcount_update(tp, done_item, dop,
|
error = xfs_trans_log_finish_refcount_update(tp, done_item,
|
||||||
refc->ri_type,
|
refc->ri_type,
|
||||||
refc->ri_startblock,
|
refc->ri_startblock,
|
||||||
refc->ri_blockcount,
|
refc->ri_blockcount,
|
||||||
|
@ -193,7 +193,6 @@ xfs_rmap_update_create_done(
|
|||||||
STATIC int
|
STATIC int
|
||||||
xfs_rmap_update_finish_item(
|
xfs_rmap_update_finish_item(
|
||||||
struct xfs_trans *tp,
|
struct xfs_trans *tp,
|
||||||
struct xfs_defer_ops *dop,
|
|
||||||
struct list_head *item,
|
struct list_head *item,
|
||||||
void *done_item,
|
void *done_item,
|
||||||
void **state)
|
void **state)
|
||||||
|
Loading…
Reference in New Issue
Block a user