Skip to content

Commit

Permalink
xfs: Add delay ready attr set routines
Browse files Browse the repository at this point in the history
This patch modifies the attr set routines to be delay ready. This means
they no longer roll or commit transactions, but instead return -EAGAIN
to have the calling routine roll and refresh the transaction.  In this
series, xfs_attr_set_args has become xfs_attr_set_iter, which uses a
state machine like switch to keep track of where it was when EAGAIN was
returned.

Part of xfs_attr_leaf_addname has been factored out into a new helper
function xfs_attr_leaf_try_add to allow transaction cycling between the
two routines.

Two new helper functions have been added: xfs_attr_rmtval_set_init and
xfs_attr_rmtval_set_blk.  They provide a subset of logic similar to
xfs_attr_rmtval_set, but they store the current block in the delay attr
context to allow the caller to roll the transaction between allocations.
This helps to simplify and consolidate code used by
xfs_attr_leaf_addname and xfs_attr_node_addname

Finally, xfs_attr_set_args has become a simple loop to refresh the
transaction until the operation is completed.

Signed-off-by: Allison Collins <allison.henderson@oracle.com>
  • Loading branch information
allisonhenderson committed Jan 18, 2020
1 parent 6e3065b commit 5a5159a
Show file tree
Hide file tree
Showing 5 changed files with 301 additions and 131 deletions.

0 comments on commit 5a5159a

Please sign in to comment.