Commit 5af9f550 authored by John Garry's avatar John Garry Committed by Darrick J. Wong
Browse files

xfs: rename xfs_inode_can_atomicwrite() -> xfs_inode_can_hw_atomic_write()



In future we will want to be able to check if specifically HW offload-based
atomic writes are possible, so rename xfs_inode_can_atomicwrite() ->
xfs_inode_can_hw_atomicwrite().

Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
[djwong: add an underscore to be consistent with everything else]
Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarJohn Garry <john.g.garry@oracle.com>
parent 84270a1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1488,7 +1488,7 @@ xfs_file_open(
	if (xfs_is_shutdown(XFS_M(inode->i_sb)))
		return -EIO;
	file->f_mode |= FMODE_NOWAIT | FMODE_CAN_ODIRECT;
	if (xfs_inode_can_atomicwrite(XFS_I(inode)))
	if (xfs_inode_can_hw_atomic_write(XFS_I(inode)))
		file->f_mode |= FMODE_CAN_ATOMIC_WRITE;
	return generic_file_open(inode, file);
}
+1 −3
Original line number Diff line number Diff line
@@ -356,9 +356,7 @@ static inline bool xfs_inode_has_bigrtalloc(const struct xfs_inode *ip)
	(XFS_IS_REALTIME_INODE(ip) ? \
		(ip)->i_mount->m_rtdev_targp : (ip)->i_mount->m_ddev_targp)

static inline bool
xfs_inode_can_atomicwrite(
	struct xfs_inode	*ip)
static inline bool xfs_inode_can_hw_atomic_write(const struct xfs_inode *ip)
{
	struct xfs_mount	*mp = ip->i_mount;
	struct xfs_buftarg	*target = xfs_inode_buftarg(ip);
+1 −1
Original line number Diff line number Diff line
@@ -608,7 +608,7 @@ xfs_report_atomic_write(
{
	unsigned int		unit_min = 0, unit_max = 0;

	if (xfs_inode_can_atomicwrite(ip))
	if (xfs_inode_can_hw_atomic_write(ip))
		unit_min = unit_max = ip->i_mount->m_sb.sb_blocksize;
	generic_fill_statx_atomic_writes(stat, unit_min, unit_max, 0);
}