Message ID | 20200403221229.4995-18-allison.henderson@oracle.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | xfs: Delay Ready Attributes | expand |
On Fri, Apr 03, 2020 at 03:12:26PM -0700, Allison Collins wrote: > This patch adds another new helper function > xfs_attr_node_removename_rmt. This will also help modularize > xfs_attr_node_removename when we add delay ready attributes later. > > Signed-off-by: Allison Collins <allison.henderson@oracle.com> > --- > fs/xfs/libxfs/xfs_attr.c | 32 +++++++++++++++++++++++--------- > 1 file changed, 23 insertions(+), 9 deletions(-) > > diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c > index 3c33dc5..d735570 100644 > --- a/fs/xfs/libxfs/xfs_attr.c > +++ b/fs/xfs/libxfs/xfs_attr.c > @@ -1221,6 +1221,28 @@ int xfs_attr_node_removename_setup( > return 0; > } > > +STATIC int > +xfs_attr_node_removename_rmt ( > + struct xfs_da_args *args, > + struct xfs_da_state *state) > +{ > + int error = 0; > + > + error = xfs_attr_rmtval_remove(args); > + if (error) > + return error; > + > + /* > + * Refill the state structure with buffers, the prior calls > + * released our buffers. > + */ The comment can be widened to 80 chars now that indentation has been reduced. > + error = xfs_attr_refillstate(state); > + if (error) > + return error; > + > + return 0; return xfs_attr_refillstate(state); With those nits fixed: Reviewed-by: Brian Foster <bfoster@redhat.com> > +} > + > /* > * Remove a name from a B-tree attribute list. > * > @@ -1249,15 +1271,7 @@ xfs_attr_node_removename( > * overflow the maximum size of a transaction and/or hit a deadlock. > */ > if (args->rmtblkno > 0) { > - error = xfs_attr_rmtval_remove(args); > - if (error) > - goto out; > - > - /* > - * Refill the state structure with buffers, the prior calls > - * released our buffers. > - */ > - error = xfs_attr_refillstate(state); > + error = xfs_attr_node_removename_rmt(args, state); > if (error) > goto out; > } > -- > 2.7.4 >
On 4/8/20 5:10 AM, Brian Foster wrote: > On Fri, Apr 03, 2020 at 03:12:26PM -0700, Allison Collins wrote: >> This patch adds another new helper function >> xfs_attr_node_removename_rmt. This will also help modularize >> xfs_attr_node_removename when we add delay ready attributes later. >> >> Signed-off-by: Allison Collins <allison.henderson@oracle.com> >> --- >> fs/xfs/libxfs/xfs_attr.c | 32 +++++++++++++++++++++++--------- >> 1 file changed, 23 insertions(+), 9 deletions(-) >> >> diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c >> index 3c33dc5..d735570 100644 >> --- a/fs/xfs/libxfs/xfs_attr.c >> +++ b/fs/xfs/libxfs/xfs_attr.c >> @@ -1221,6 +1221,28 @@ int xfs_attr_node_removename_setup( >> return 0; >> } >> >> +STATIC int >> +xfs_attr_node_removename_rmt ( >> + struct xfs_da_args *args, >> + struct xfs_da_state *state) >> +{ >> + int error = 0; >> + >> + error = xfs_attr_rmtval_remove(args); >> + if (error) >> + return error; >> + >> + /* >> + * Refill the state structure with buffers, the prior calls >> + * released our buffers. >> + */ > > The comment can be widened to 80 chars now that indentation has been > reduced. > >> + error = xfs_attr_refillstate(state); >> + if (error) >> + return error; >> + >> + return 0; > > return xfs_attr_refillstate(state); > > With those nits fixed: > > Reviewed-by: Brian Foster <bfoster@redhat.com> Alrighty, will fix. Thanks! Allison > >> +} >> + >> /* >> * Remove a name from a B-tree attribute list. >> * >> @@ -1249,15 +1271,7 @@ xfs_attr_node_removename( >> * overflow the maximum size of a transaction and/or hit a deadlock. >> */ >> if (args->rmtblkno > 0) { >> - error = xfs_attr_rmtval_remove(args); >> - if (error) >> - goto out; >> - >> - /* >> - * Refill the state structure with buffers, the prior calls >> - * released our buffers. >> - */ >> - error = xfs_attr_refillstate(state); >> + error = xfs_attr_node_removename_rmt(args, state); >> if (error) >> goto out; >> } >> -- >> 2.7.4 >> >
On Saturday, April 4, 2020 3:42 AM Allison Collins wrote: > This patch adds another new helper function > xfs_attr_node_removename_rmt. This will also help modularize > xfs_attr_node_removename when we add delay ready attributes later. > The changes look logically correct. Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com> > Signed-off-by: Allison Collins <allison.henderson@oracle.com> > --- > fs/xfs/libxfs/xfs_attr.c | 32 +++++++++++++++++++++++--------- > 1 file changed, 23 insertions(+), 9 deletions(-) > > diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c > index 3c33dc5..d735570 100644 > --- a/fs/xfs/libxfs/xfs_attr.c > +++ b/fs/xfs/libxfs/xfs_attr.c > @@ -1221,6 +1221,28 @@ int xfs_attr_node_removename_setup( > return 0; > } > > +STATIC int > +xfs_attr_node_removename_rmt ( > + struct xfs_da_args *args, > + struct xfs_da_state *state) > +{ > + int error = 0; > + > + error = xfs_attr_rmtval_remove(args); > + if (error) > + return error; > + > + /* > + * Refill the state structure with buffers, the prior calls > + * released our buffers. > + */ > + error = xfs_attr_refillstate(state); > + if (error) > + return error; > + > + return 0; > +} > + > /* > * Remove a name from a B-tree attribute list. > * > @@ -1249,15 +1271,7 @@ xfs_attr_node_removename( > * overflow the maximum size of a transaction and/or hit a deadlock. > */ > if (args->rmtblkno > 0) { > - error = xfs_attr_rmtval_remove(args); > - if (error) > - goto out; > - > - /* > - * Refill the state structure with buffers, the prior calls > - * released our buffers. > - */ > - error = xfs_attr_refillstate(state); > + error = xfs_attr_node_removename_rmt(args, state); > if (error) > goto out; > } >
On 4/19/20 11:38 PM, Chandan Rajendra wrote: > On Saturday, April 4, 2020 3:42 AM Allison Collins wrote: >> This patch adds another new helper function >> xfs_attr_node_removename_rmt. This will also help modularize >> xfs_attr_node_removename when we add delay ready attributes later. >> > > The changes look logically correct. > > Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com> Thank you! Allison > >> Signed-off-by: Allison Collins <allison.henderson@oracle.com> >> --- >> fs/xfs/libxfs/xfs_attr.c | 32 +++++++++++++++++++++++--------- >> 1 file changed, 23 insertions(+), 9 deletions(-) >> >> diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c >> index 3c33dc5..d735570 100644 >> --- a/fs/xfs/libxfs/xfs_attr.c >> +++ b/fs/xfs/libxfs/xfs_attr.c >> @@ -1221,6 +1221,28 @@ int xfs_attr_node_removename_setup( >> return 0; >> } >> >> +STATIC int >> +xfs_attr_node_removename_rmt ( >> + struct xfs_da_args *args, >> + struct xfs_da_state *state) >> +{ >> + int error = 0; >> + >> + error = xfs_attr_rmtval_remove(args); >> + if (error) >> + return error; >> + >> + /* >> + * Refill the state structure with buffers, the prior calls >> + * released our buffers. >> + */ >> + error = xfs_attr_refillstate(state); >> + if (error) >> + return error; >> + >> + return 0; >> +} >> + >> /* >> * Remove a name from a B-tree attribute list. >> * >> @@ -1249,15 +1271,7 @@ xfs_attr_node_removename( >> * overflow the maximum size of a transaction and/or hit a deadlock. >> */ >> if (args->rmtblkno > 0) { >> - error = xfs_attr_rmtval_remove(args); >> - if (error) >> - goto out; >> - >> - /* >> - * Refill the state structure with buffers, the prior calls >> - * released our buffers. >> - */ >> - error = xfs_attr_refillstate(state); >> + error = xfs_attr_node_removename_rmt(args, state); >> if (error) >> goto out; >> } >> > >
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c index 3c33dc5..d735570 100644 --- a/fs/xfs/libxfs/xfs_attr.c +++ b/fs/xfs/libxfs/xfs_attr.c @@ -1221,6 +1221,28 @@ int xfs_attr_node_removename_setup( return 0; } +STATIC int +xfs_attr_node_removename_rmt ( + struct xfs_da_args *args, + struct xfs_da_state *state) +{ + int error = 0; + + error = xfs_attr_rmtval_remove(args); + if (error) + return error; + + /* + * Refill the state structure with buffers, the prior calls + * released our buffers. + */ + error = xfs_attr_refillstate(state); + if (error) + return error; + + return 0; +} + /* * Remove a name from a B-tree attribute list. * @@ -1249,15 +1271,7 @@ xfs_attr_node_removename( * overflow the maximum size of a transaction and/or hit a deadlock. */ if (args->rmtblkno > 0) { - error = xfs_attr_rmtval_remove(args); - if (error) - goto out; - - /* - * Refill the state structure with buffers, the prior calls - * released our buffers. - */ - error = xfs_attr_refillstate(state); + error = xfs_attr_node_removename_rmt(args, state); if (error) goto out; }
This patch adds another new helper function xfs_attr_node_removename_rmt. This will also help modularize xfs_attr_node_removename when we add delay ready attributes later. Signed-off-by: Allison Collins <allison.henderson@oracle.com> --- fs/xfs/libxfs/xfs_attr.c | 32 +++++++++++++++++++++++--------- 1 file changed, 23 insertions(+), 9 deletions(-)