diff mbox series

[v3,26/26] xfs: drop compatibility minimum log size computations for reflink

Message ID 20220922054458.40826-27-allison.henderson@oracle.com (mailing list archive)
State Superseded
Headers show
Series Parent Pointers | expand

Commit Message

Allison Henderson Sept. 22, 2022, 5:44 a.m. UTC
From: Allison Henderson <allison.henderson@oracle.com>

Having established that we can reduce the minimum log size computation
for filesystems with parent pointers or any newer feature, we should
also drop the compat minlogsize code that we added when we reduced the
transaction reservation size for rmap and reflink.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
---
 fs/xfs/libxfs/xfs_log_rlimit.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

Comments

Darrick J. Wong Sept. 23, 2022, 9:48 p.m. UTC | #1
On Wed, Sep 21, 2022 at 10:44:58PM -0700, allison.henderson@oracle.com wrote:
> From: Allison Henderson <allison.henderson@oracle.com>

This one is totally unchanged from when I sent it.  So:

From: Darrick J. Wong <djwong@kernel.org>

> Having established that we can reduce the minimum log size computation
> for filesystems with parent pointers or any newer feature, we should
> also drop the compat minlogsize code that we added when we reduced the
> transaction reservation size for rmap and reflink.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> Signed-off-by: Allison Henderson <allison.henderson@oracle.com>

Change this to

Reviewed-by: Allison Henderson <allison.henderson@oracle.com>

and this patch is also done.

--D

> ---
>  fs/xfs/libxfs/xfs_log_rlimit.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/fs/xfs/libxfs/xfs_log_rlimit.c b/fs/xfs/libxfs/xfs_log_rlimit.c
> index e5c606fb7a6a..74821c7fd0cc 100644
> --- a/fs/xfs/libxfs/xfs_log_rlimit.c
> +++ b/fs/xfs/libxfs/xfs_log_rlimit.c
> @@ -91,6 +91,16 @@ xfs_log_calc_trans_resv_for_minlogblocks(
>  {
>  	unsigned int		rmap_maxlevels = mp->m_rmap_maxlevels;
>  
> +	/*
> +	 * Starting with the parent pointer feature, every new fs feature
> +	 * drops the oversized minimum log size computation introduced by the
> +	 * original reflink code.
> +	 */
> +	if (xfs_has_parent_or_newer_feature(mp)) {
> +		xfs_trans_resv_calc(mp, resv);
> +		return;
> +	}
> +
>  	/*
>  	 * In the early days of rmap+reflink, we always set the rmap maxlevels
>  	 * to 9 even if the AG was small enough that it would never grow to
> -- 
> 2.25.1
>
Allison Henderson Sept. 26, 2022, 9:50 p.m. UTC | #2
On Fri, 2022-09-23 at 14:48 -0700, Darrick J. Wong wrote:
> On Wed, Sep 21, 2022 at 10:44:58PM -0700,
> allison.henderson@oracle.com wrote:
> > From: Allison Henderson <allison.henderson@oracle.com>
> 
> This one is totally unchanged from when I sent it.  So:
> 
> From: Darrick J. Wong <djwong@kernel.org>
> 
> > Having established that we can reduce the minimum log size
> > computation
> > for filesystems with parent pointers or any newer feature, we
> > should
> > also drop the compat minlogsize code that we added when we reduced
> > the
> > transaction reservation size for rmap and reflink.
> > 
> > Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> > Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
> 
> Change this to
> 
> Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Sure, as long as folks are ok with that :-)

Allison

> 
> and this patch is also done.
> 
> --D
> 
> > ---
> >  fs/xfs/libxfs/xfs_log_rlimit.c | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/fs/xfs/libxfs/xfs_log_rlimit.c
> > b/fs/xfs/libxfs/xfs_log_rlimit.c
> > index e5c606fb7a6a..74821c7fd0cc 100644
> > --- a/fs/xfs/libxfs/xfs_log_rlimit.c
> > +++ b/fs/xfs/libxfs/xfs_log_rlimit.c
> > @@ -91,6 +91,16 @@ xfs_log_calc_trans_resv_for_minlogblocks(
> >  {
> >         unsigned int            rmap_maxlevels = mp-
> > >m_rmap_maxlevels;
> >  
> > +       /*
> > +        * Starting with the parent pointer feature, every new fs
> > feature
> > +        * drops the oversized minimum log size computation
> > introduced by the
> > +        * original reflink code.
> > +        */
> > +       if (xfs_has_parent_or_newer_feature(mp)) {
> > +               xfs_trans_resv_calc(mp, resv);
> > +               return;
> > +       }
> > +
> >         /*
> >          * In the early days of rmap+reflink, we always set the
> > rmap maxlevels
> >          * to 9 even if the AG was small enough that it would never
> > grow to
> > -- 
> > 2.25.1
> >
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_log_rlimit.c b/fs/xfs/libxfs/xfs_log_rlimit.c
index e5c606fb7a6a..74821c7fd0cc 100644
--- a/fs/xfs/libxfs/xfs_log_rlimit.c
+++ b/fs/xfs/libxfs/xfs_log_rlimit.c
@@ -91,6 +91,16 @@  xfs_log_calc_trans_resv_for_minlogblocks(
 {
 	unsigned int		rmap_maxlevels = mp->m_rmap_maxlevels;
 
+	/*
+	 * Starting with the parent pointer feature, every new fs feature
+	 * drops the oversized minimum log size computation introduced by the
+	 * original reflink code.
+	 */
+	if (xfs_has_parent_or_newer_feature(mp)) {
+		xfs_trans_resv_calc(mp, resv);
+		return;
+	}
+
 	/*
 	 * In the early days of rmap+reflink, we always set the rmap maxlevels
 	 * to 9 even if the AG was small enough that it would never grow to