summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_iomap.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-10-30 12:24:59 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-11-03 10:22:30 -0800
commite696663a97e89f88d085ff84b8a373989ae613b1 (patch)
tree89b73dd4b10dddb2198ff318f86b7264a697caf0 /fs/xfs/xfs_iomap.h
parent307cdb54b80e036978b7b717abcbcfdac0b34e38 (diff)
downloadlinux-stable-e696663a97e89f88d085ff84b8a373989ae613b1.tar.gz
linux-stable-e696663a97e89f88d085ff84b8a373989ae613b1.tar.bz2
linux-stable-e696663a97e89f88d085ff84b8a373989ae613b1.zip
xfs: simplify the xfs_iomap_write_direct calling
Move the EOF alignment and checking for the next allocated extent into the callers to avoid the need to pass the byte based offset and count as well as looking at the incoming imap. The added benefit is that the caller can unlock the incoming ilock and the function doesn't have funny unbalanced locking contexts. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_iomap.h')
-rw-r--r--fs/xfs/xfs_iomap.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h
index d5b292bdaf82..7d3703556d0e 100644
--- a/fs/xfs/xfs_iomap.h
+++ b/fs/xfs/xfs_iomap.h
@@ -11,9 +11,11 @@
struct xfs_inode;
struct xfs_bmbt_irec;
-int xfs_iomap_write_direct(struct xfs_inode *, xfs_off_t, size_t,
- struct xfs_bmbt_irec *, int);
+int xfs_iomap_write_direct(struct xfs_inode *ip, xfs_fileoff_t offset_fsb,
+ xfs_fileoff_t count_fsb, struct xfs_bmbt_irec *imap);
int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, xfs_off_t, bool);
+xfs_fileoff_t xfs_iomap_eof_align_last_fsb(struct xfs_inode *ip,
+ xfs_fileoff_t end_fsb);
int xfs_bmbt_to_iomap(struct xfs_inode *, struct iomap *,
struct xfs_bmbt_irec *, u16);