diff mbox

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

Message ID 1472783257-15941-6-git-send-email-david@fromorbit.com
State New
Headers show

Commit Message

Dave Chinner Sept. 2, 2016, 2:27 a.m. UTC
From: Dave Chinner <dchinner@redhat.com>

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@redhat.com>
---
 fs/xfs/xfs_fsops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

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);