aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_rtalloc.c
diff options
context:
space:
mode:
authorChandan Babu R <[email protected]>2022-03-09 07:49:36 +0000
committerChandan Babu R <[email protected]>2022-04-13 07:02:44 +0000
commit4f86bb4b66c999ad9ddcfd49fec93992eeba2715 (patch)
tree593c82f5b2a0f9f9bdd1c1dcd3fb34dbb5b8b661 /fs/xfs/xfs_rtalloc.c
parentxfs: Directory's data fork extent counter can never overflow (diff)
downloadkernel-4f86bb4b66c999ad9ddcfd49fec93992eeba2715.tar.gz
kernel-4f86bb4b66c999ad9ddcfd49fec93992eeba2715.zip
xfs: Conditionally upgrade existing inodes to use large extent counters
This commit enables upgrading existing inodes to use large extent counters provided that underlying filesystem's superblock has large extent counter feature enabled. Reviewed-by: Darrick J. Wong <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Signed-off-by: Chandan Babu R <[email protected]>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r--fs/xfs/xfs_rtalloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index b8c79ee791af..3e587e85d5bf 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -806,6 +806,9 @@ xfs_growfs_rt_alloc(
error = xfs_iext_count_may_overflow(ip, XFS_DATA_FORK,
XFS_IEXT_ADD_NOSPLIT_CNT);
+ if (error == -EFBIG)
+ error = xfs_iext_count_upgrade(tp, ip,
+ XFS_IEXT_ADD_NOSPLIT_CNT);
if (error)
goto out_trans_cancel;