1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2003-2005 Silicon Graphics, Inc.
6 #ifndef __XFS_IOMAP_H__
7 #define __XFS_IOMAP_H__
9 #include <linux/iomap.h>
14 int xfs_iomap_write_direct(struct xfs_inode
*, xfs_off_t
, size_t,
15 struct xfs_bmbt_irec
*, int);
16 int xfs_iomap_write_unwritten(struct xfs_inode
*, xfs_off_t
, xfs_off_t
, bool);
18 int xfs_bmbt_to_iomap(struct xfs_inode
*, struct iomap
*,
19 struct xfs_bmbt_irec
*, bool shared
);
20 xfs_extlen_t
xfs_eof_alignment(struct xfs_inode
*ip
, xfs_extlen_t extsize
);
22 static inline xfs_filblks_t
23 xfs_aligned_fsb_count(
24 xfs_fileoff_t offset_fsb
,
25 xfs_filblks_t count_fsb
,
31 div_u64_rem(offset_fsb
, extsz
, &align
);
34 div_u64_rem(count_fsb
, extsz
, &align
);
36 count_fsb
+= extsz
- align
;
42 extern const struct iomap_ops xfs_iomap_ops
;
43 extern const struct iomap_ops xfs_seek_iomap_ops
;
44 extern const struct iomap_ops xfs_xattr_iomap_ops
;
46 #endif /* __XFS_IOMAP_H__*/