Searched hist:"251 b29c88eb84922e916ed4685f50db741aeb0af" (Results 1 – 2 of 2) sorted by relevance
/linux/fs/xfs/libxfs/ |
H A D | xfs_attr.h | diff 251b29c88eb84922e916ed4685f50db741aeb0af Thu May 12 07:12:54 CEST 2022 Dave Chinner <dchinner@redhat.com> xfs: consolidate leaf/node states in xfs_attr_set_iter
The operations performed from XFS_DAS_FOUND_LBLK through to XFS_DAS_RM_LBLK are now identical to XFS_DAS_FOUND_NBLK through to XFS_DAS_RM_NBLK. We can collapse these down into a single set of code.
To do this, define the states that leaf and node run through as separate sets of sequential states. Then as we move to the next state, we can use increments rather than specific state assignments to move through the states. This means the state progression is set by the initial state that enters the series and we don't need to duplicate the code anymore.
At the exit point of the series we need to select the correct leaf or node state, but that can also be done by state increment rather than assignment.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Allison Henderson<allison.henderson@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Dave Chinner <david@fromorbit.com>
|
H A D | xfs_attr.c | diff 251b29c88eb84922e916ed4685f50db741aeb0af Thu May 12 07:12:54 CEST 2022 Dave Chinner <dchinner@redhat.com> xfs: consolidate leaf/node states in xfs_attr_set_iter
The operations performed from XFS_DAS_FOUND_LBLK through to XFS_DAS_RM_LBLK are now identical to XFS_DAS_FOUND_NBLK through to XFS_DAS_RM_NBLK. We can collapse these down into a single set of code.
To do this, define the states that leaf and node run through as separate sets of sequential states. Then as we move to the next state, we can use increments rather than specific state assignments to move through the states. This means the state progression is set by the initial state that enters the series and we don't need to duplicate the code anymore.
At the exit point of the series we need to select the correct leaf or node state, but that can also be done by state increment rather than assignment.
Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Allison Henderson<allison.henderson@oracle.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Dave Chinner <david@fromorbit.com>
|