Re: [PATCH v7 17/19] xfs: Add helper function xfs_attr_leaf_mark_incomplete

Dave Chinner
2020-02-25T09:31:47Z

On Sat, Feb 22, 2020 at 07:06:09PM -0700, Allison Collins wrote:
> This patch helps to simplify xfs_attr_node_removename by modularizing the code
> around the transactions into helper functions. This will make the function easier
> to follow when we introduce delayed attributes.
>
> Signed-off-by: Allison Collins <allison.henderson@oracle.com>

Another candidate for being at the start of this patchset.

> ---
> fs/xfs/libxfs/xfs_attr.c | 45 +++++++++++++++++++++++++++++++--------------
> 1 file changed, 31 insertions(+), 14 deletions(-)
>
> diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
> index dd935ff..b9728d1 100644
> --- a/fs/xfs/libxfs/xfs_attr.c
> +++ b/fs/xfs/libxfs/xfs_attr.c
> @@ -1416,6 +1416,36 @@ xfs_attr_node_shrink(
> }
>
> /*
> + * Mark an attribute entry INCOMPLETE and save pointers to the relevant buffers
> + * for later deletion of the entry.
> + */
> +STATIC int
> +xfs_attr_leaf_mark_incomplete(
> + struct xfs_da_args *args,
> + struct xfs_da_state *state)
> +{
> + int error;
> +
> + /*
> + * Fill in disk block numbers in the state structure
> + * so that we can get the buffers back after we commit
> + * several transactions in the following calls.
> + */

Reformat to use all 80 columns.

[ Handy vim hints, add this to your .vimrc:

" set the textwidth to 80 characters for C code
au BufNewFile,BufRead *.c,*.h set tw=80

" set the textwidth to 68 characters for guilt commit messages
au BufNewFile,BufRead guilt.msg.*,.gitsendemail.*,git.*,*/.git/* set tw=68

" Formatting the current paragraph according to
" the current 'textwidth' with ^J (control-j):
imap <C-J> <c-o>gqap
map <C-J> gqap

" highlight textwidth
set cc=+1

]

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com