Commit 988a1682 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Carlos Maiolino
Browse files

xfs: rename the bt_bdev_* buftarg fields



The extra bdev_ is weird, so drop it.  Also improve the comment to make
it clear these are the hardware limits.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJohn Garry <john.g.garry@oracle.com>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarCarlos Maiolino <cem@kernel.org>
parent e4a7a3f9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1712,8 +1712,8 @@ xfs_configure_buftarg_atomic_writes(
		max_bytes = 0;
	}

	btp->bt_bdev_awu_min = min_bytes;
	btp->bt_bdev_awu_max = max_bytes;
	btp->bt_awu_min = min_bytes;
	btp->bt_awu_max = max_bytes;
}

/* Configure a buffer target that abstracts a block device. */
+3 −3
Original line number Diff line number Diff line
@@ -112,9 +112,9 @@ struct xfs_buftarg {
	struct percpu_counter	bt_readahead_count;
	struct ratelimit_state	bt_ioerror_rl;

	/* Atomic write unit values, bytes */
	unsigned int		bt_bdev_awu_min;
	unsigned int		bt_bdev_awu_max;
	/* Hardware atomic write unit values, bytes */
	unsigned int		bt_awu_min;
	unsigned int		bt_awu_max;

	/* built-in cache, if we're not using the perag one */
	struct xfs_buf_cache	bt_cache[];
+1 −1
Original line number Diff line number Diff line
@@ -752,7 +752,7 @@ xfs_file_dio_write_atomic(
	 * HW offload should be faster, so try that first if it is already
	 * known that the write length is not too large.
	 */
	if (ocount > xfs_inode_buftarg(ip)->bt_bdev_awu_max)
	if (ocount > xfs_inode_buftarg(ip)->bt_awu_max)
		dops = &xfs_atomic_write_cow_iomap_ops;
	else
		dops = &xfs_direct_write_iomap_ops;
+1 −1
Original line number Diff line number Diff line
@@ -358,7 +358,7 @@ static inline bool xfs_inode_has_bigrtalloc(const struct xfs_inode *ip)

static inline bool xfs_inode_can_hw_atomic_write(const struct xfs_inode *ip)
{
	return xfs_inode_buftarg(ip)->bt_bdev_awu_max > 0;
	return xfs_inode_buftarg(ip)->bt_awu_max > 0;
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -827,7 +827,7 @@ xfs_bmap_hw_atomic_write_possible(
	/*
	 * The ->iomap_begin caller should ensure this, but check anyway.
	 */
	return len <= xfs_inode_buftarg(ip)->bt_bdev_awu_max;
	return len <= xfs_inode_buftarg(ip)->bt_awu_max;
}

static int
Loading