Skip to content

Commit 988a168

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
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: Christoph Hellwig <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
1 parent e4a7a3f commit 988a168

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

fs/xfs/xfs_buf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,8 +1712,8 @@ xfs_configure_buftarg_atomic_writes(
17121712
max_bytes = 0;
17131713
}
17141714

1715-
btp->bt_bdev_awu_min = min_bytes;
1716-
btp->bt_bdev_awu_max = max_bytes;
1715+
btp->bt_awu_min = min_bytes;
1716+
btp->bt_awu_max = max_bytes;
17171717
}
17181718

17191719
/* Configure a buffer target that abstracts a block device. */

fs/xfs/xfs_buf.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ struct xfs_buftarg {
112112
struct percpu_counter bt_readahead_count;
113113
struct ratelimit_state bt_ioerror_rl;
114114

115-
/* Atomic write unit values, bytes */
116-
unsigned int bt_bdev_awu_min;
117-
unsigned int bt_bdev_awu_max;
115+
/* Hardware atomic write unit values, bytes */
116+
unsigned int bt_awu_min;
117+
unsigned int bt_awu_max;
118118

119119
/* built-in cache, if we're not using the perag one */
120120
struct xfs_buf_cache bt_cache[];

fs/xfs/xfs_file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ xfs_file_dio_write_atomic(
752752
* HW offload should be faster, so try that first if it is already
753753
* known that the write length is not too large.
754754
*/
755-
if (ocount > xfs_inode_buftarg(ip)->bt_bdev_awu_max)
755+
if (ocount > xfs_inode_buftarg(ip)->bt_awu_max)
756756
dops = &xfs_atomic_write_cow_iomap_ops;
757757
else
758758
dops = &xfs_direct_write_iomap_ops;

fs/xfs/xfs_inode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ static inline bool xfs_inode_has_bigrtalloc(const struct xfs_inode *ip)
358358

359359
static inline bool xfs_inode_can_hw_atomic_write(const struct xfs_inode *ip)
360360
{
361-
return xfs_inode_buftarg(ip)->bt_bdev_awu_max > 0;
361+
return xfs_inode_buftarg(ip)->bt_awu_max > 0;
362362
}
363363

364364
/*

fs/xfs/xfs_iomap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ xfs_bmap_hw_atomic_write_possible(
827827
/*
828828
* The ->iomap_begin caller should ensure this, but check anyway.
829829
*/
830-
return len <= xfs_inode_buftarg(ip)->bt_bdev_awu_max;
830+
return len <= xfs_inode_buftarg(ip)->bt_awu_max;
831831
}
832832

833833
static int

fs/xfs/xfs_iops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ xfs_get_atomic_write_max_opt(
665665
* less than our out of place write limit, but we don't want to exceed
666666
* the awu_max.
667667
*/
668-
return min(awu_max, xfs_inode_buftarg(ip)->bt_bdev_awu_max);
668+
return min(awu_max, xfs_inode_buftarg(ip)->bt_awu_max);
669669
}
670670

671671
static void

fs/xfs/xfs_mount.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ xfs_calc_group_awu_max(
699699

700700
if (g->blocks == 0)
701701
return 0;
702-
if (btp && btp->bt_bdev_awu_min > 0)
702+
if (btp && btp->bt_awu_min > 0)
703703
return max_pow_of_two_factor(g->blocks);
704704
return rounddown_pow_of_two(g->blocks);
705705
}

0 commit comments

Comments
 (0)