1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (c) 2020-2024 Oracle. All Rights Reserved.
6 #ifndef __XFS_EXCHRANGE_H__
7 #define __XFS_EXCHRANGE_H__
9 /* Update the mtime/cmtime of file1 and file2 */
10 #define __XFS_EXCHANGE_RANGE_UPD_CMTIME1 (1ULL << 63)
11 #define __XFS_EXCHANGE_RANGE_UPD_CMTIME2 (1ULL << 62)
13 #define XFS_EXCHANGE_RANGE_PRIV_FLAGS (__XFS_EXCHANGE_RANGE_UPD_CMTIME1 | \
14 __XFS_EXCHANGE_RANGE_UPD_CMTIME2)
16 struct xfs_exchrange {
24 u64 flags; /* XFS_EXCHANGE_RANGE flags */
27 long xfs_ioc_exchange_range(struct file *file,
28 struct xfs_exchange_range __user *argp);
30 struct xfs_exchmaps_req;
32 void xfs_exchrange_ilock(struct xfs_trans *tp, struct xfs_inode *ip1,
33 struct xfs_inode *ip2);
34 void xfs_exchrange_iunlock(struct xfs_inode *ip1, struct xfs_inode *ip2);
36 int xfs_exchrange_estimate(struct xfs_exchmaps_req *req);
38 #endif /* __XFS_EXCHRANGE_H__ */