xfs
[Top] [All Lists]

[PATCH 5/6] xfs: clean up AGFL index initialisation in growfs

To: linux-xfs@xxxxxxxxxxxxxxx
Subject: [PATCH 5/6] xfs: clean up AGFL index initialisation in growfs
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 2 Sep 2016 12:27:36 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1472783257-15941-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1472783257-15941-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

Now that we have a fixed size for the AGFL for v5 format filesysetms
across all platforms, we don't need the growfs workaround to avoid
using the last index in the AGFL. This effectively undoes commit
ad747e3 ("xfs: Don't wrap growfs AGFL indexes") and returns the
growfs code to it's prior behaviour.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 fs/xfs/xfs_fsops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_fsops.c b/fs/xfs/xfs_fsops.c
index 622ca71..e5ff65e 100644
--- a/fs/xfs/xfs_fsops.c
+++ b/fs/xfs/xfs_fsops.c
@@ -251,8 +251,8 @@ xfs_growfs_data_private(
                        agf->agf_rmap_blocks = cpu_to_be32(1);
                }
 
-               agf->agf_flfirst = cpu_to_be32(1);
-               agf->agf_fllast = 0;
+               agf->agf_flfirst = 0;
+               agf->agf_fllast = cpu_to_be32(xfs_agfl_size(mp) - 1);
                agf->agf_flcount = 0;
                tmpsize = agsize - mp->m_ag_prealloc_blocks;
                agf->agf_freeblks = cpu_to_be32(tmpsize);
-- 
2.8.0.rc3

<Prev in Thread] Current Thread [Next in Thread>