@@ -1182,14 +1182,14 @@ void sync_bdevs(bool wait)
}
/*
- * Handle STATX_{DIOALIGN, WRITE_ATOMIC} for block devices.
+ * Handle STATX_{DIOALIGN, WRITE_ATOMIC_DIO} for block devices.
*/
void bdev_statx(struct inode *backing_inode, struct kstat *stat,
u32 request_mask)
{
struct block_device *bdev;
- if (!(request_mask & (STATX_DIOALIGN | STATX_WRITE_ATOMIC)))
+ if (!(request_mask & (STATX_DIOALIGN | STATX_WRITE_ATOMIC_DIO)))
return;
/*
@@ -1208,7 +1208,7 @@ void bdev_statx(struct inode *backing_inode, struct kstat *stat,
stat->result_mask |= STATX_DIOALIGN;
}
- if (request_mask & STATX_WRITE_ATOMIC && bdev_can_atomic_write(bdev)) {
+ if (request_mask & STATX_WRITE_ATOMIC_DIO && bdev_can_atomic_write(bdev)) {
struct request_queue *bd_queue = bdev->bd_queue;
generic_fill_statx_atomic_writes(stat,
@@ -95,18 +95,18 @@ EXPORT_SYMBOL(generic_fill_statx_attr);
* @unit_min: Minimum supported atomic write length in bytes
* @unit_max: Maximum supported atomic write length in bytes
*
- * Fill in the STATX{_ATTR}_WRITE_ATOMIC flags in the kstat structure from
- * atomic write unit_min and unit_max values.
+ * Fill in the STATX{_ATTR}_WRITE_ATOMIC_DIO flags in the kstat structure
+ * from atomic write unit_min and unit_max values.
*/
void generic_fill_statx_atomic_writes(struct kstat *stat,
unsigned int unit_min,
unsigned int unit_max)
{
/* Confirm that the request type is known */
- stat->result_mask |= STATX_WRITE_ATOMIC;
+ stat->result_mask |= STATX_WRITE_ATOMIC_DIO;
/* Confirm that the file attribute type is known */
- stat->attributes_mask |= STATX_ATTR_WRITE_ATOMIC;
+ stat->attributes_mask |= STATX_ATTR_WRITE_ATOMIC_DIO;
if (unit_min) {
stat->atomic_write_unit_min = unit_min;
@@ -115,7 +115,7 @@ void generic_fill_statx_atomic_writes(struct kstat *stat,
stat->atomic_write_segments_max = 1;
/* Confirm atomic writes are actually supported */
- stat->attributes |= STATX_ATTR_WRITE_ATOMIC;
+ stat->attributes |= STATX_ATTR_WRITE_ATOMIC_DIO;
}
}
EXPORT_SYMBOL_GPL(generic_fill_statx_atomic_writes);
@@ -650,7 +650,7 @@ xfs_vn_getattr(
stat->dio_mem_align = bdev_dma_alignment(bdev) + 1;
stat->dio_offset_align = bdev_logical_block_size(bdev);
}
- if (request_mask & STATX_WRITE_ATOMIC) {
+ if (request_mask & STATX_WRITE_ATOMIC_DIO) {
unsigned int unit_min, unit_max;
xfs_get_atomic_write_attr(ip, &unit_min, &unit_max);
@@ -160,7 +160,7 @@ struct statx {
#define STATX_MNT_ID 0x00001000U /* Got stx_mnt_id */
#define STATX_DIOALIGN 0x00002000U /* Want/got direct I/O alignment info */
#define STATX_MNT_ID_UNIQUE 0x00004000U /* Want/got extended stx_mount_id */
-#define STATX_WRITE_ATOMIC 0x00008000U /* Want/got atomic_write_* fields */
+#define STATX_WRITE_ATOMIC_DIO 0x00008000U /* Want/got atomic_write_* fields for dio */
#define STATX__RESERVED 0x80000000U /* Reserved for future struct statx expansion */
@@ -196,7 +196,7 @@ struct statx {
#define STATX_ATTR_MOUNT_ROOT 0x00002000 /* Root of a mount */
#define STATX_ATTR_VERITY 0x00100000 /* [I] Verity protected file */
#define STATX_ATTR_DAX 0x00200000 /* File is currently in DAX state */
-#define STATX_ATTR_WRITE_ATOMIC 0x00400000 /* File supports atomic write operations */
+#define STATX_ATTR_WRITE_ATOMIC_DIO 0x00400000 /* File supports atomic write dio operations */
#endif /* _UAPI_LINUX_STAT_H */
Rename STATX_WRITE_ATOMIC -> STATX_WRITE_ATOMIC_DIO and STATX_ATTR_WRITE_ATOMIC -> STATX_ATTR_WRITE_ATOMIC_DIO, to make it clear that they are only relevant to direct IO. Signed-off-by: John Garry <john.g.garry@oracle.com> --- block/bdev.c | 6 +++--- fs/stat.c | 10 +++++----- fs/xfs/xfs_iops.c | 2 +- include/uapi/linux/stat.h | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-)