[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240429174746.2132161-11-john.g.garry@oracle.com>
Date: Mon, 29 Apr 2024 17:47:35 +0000
From: John Garry <john.g.garry@...cle.com>
To: david@...morbit.com, djwong@...nel.org, hch@....de,
viro@...iv.linux.org.uk, brauner@...nel.org, jack@...e.cz,
chandan.babu@...cle.com, willy@...radead.org
Cc: axboe@...nel.dk, martin.petersen@...cle.com, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, tytso@....edu, jbongio@...gle.com,
ojaswin@...ux.ibm.com, ritesh.list@...il.com, mcgrof@...nel.org,
p.raghav@...sung.com, linux-xfs@...r.kernel.org,
catherine.hoang@...cle.com, John Garry <john.g.garry@...cle.com>
Subject: [PATCH v3 10/21] xfs: Update xfs_is_falloc_aligned() mask for forcealign
For when forcealign is enabled, we want the alignment mask to cover an
aligned extent, similar to rtvol.
Signed-off-by: John Garry <john.g.garry@...cle.com>
---
fs/xfs/xfs_file.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 632653e00906..e81e01e6b22b 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -61,7 +61,10 @@ xfs_is_falloc_aligned(
}
mask = XFS_FSB_TO_B(mp, mp->m_sb.sb_rextsize) - 1;
} else {
- mask = mp->m_sb.sb_blocksize - 1;
+ if (xfs_inode_has_forcealign(ip) && ip->i_extsize > 1)
+ mask = (mp->m_sb.sb_blocksize * ip->i_extsize) - 1;
+ else
+ mask = mp->m_sb.sb_blocksize - 1;
}
return !((pos | len) & mask);
--
2.31.1
Powered by blists - more mailing lists