[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240607143919.2622319-13-john.g.garry@oracle.com>
Date: Fri, 7 Jun 2024 14:39:09 +0000
From: John Garry <john.g.garry@...cle.com>
To: axboe@...nel.dk, tytso@....edu, dchinner@...hat.com,
viro@...iv.linux.org.uk, brauner@...nel.org, djwong@...nel.org,
jack@...e.com, chandan.babu@...cle.com, hch@....de
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-btrfs@...r.kernel.org, linux-erofs@...ts.ozlabs.org,
linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
linux-fsdevel@...r.kernel.org, gfs2@...ts.linux.dev,
linux-xfs@...r.kernel.org, catherine.hoang@...cle.com,
ritesh.list@...il.com, mcgrof@...nel.org,
mikulas@...ax.karlin.mff.cuni.cz, agruenba@...hat.com,
miklos@...redi.hu, martin.petersen@...cle.com,
John Garry <john.g.garry@...cle.com>
Subject: [PATCH v4 12/22] xfs: Update xfs_inode_alloc_unitsize_fsb() for forcealign
For forcealign enabled, the allocation unit size is in ip->i_extsize, and
this must never be zero.
Signed-off-by: John Garry <john.g.garry@...cle.com>
---
fs/xfs/xfs_inode.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index a6cd5f1f2680..9c0ae5c3682e 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -4281,6 +4281,8 @@ unsigned int
xfs_inode_alloc_unitsize_fsb(
struct xfs_inode *ip)
{
+ if (xfs_inode_has_forcealign(ip))
+ return ip->i_extsize;
if (XFS_IS_REALTIME_INODE(ip))
return ip->i_mount->m_sb.sb_rextsize;
--
2.31.1
Powered by blists - more mailing lists