summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_iomap.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-10-03 18:11:43 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2016-10-06 01:26:26 +0200
commitf7ca35227253dc8244fd908140b06010e67a31e5 (patch)
tree2e2731cafe2a8e8f6679d2a58eef031c1a84ffba /fs/xfs/xfs_iomap.h
parentxfs: unshare a range of blocks via fallocate (diff)
downloadlinux-f7ca35227253dc8244fd908140b06010e67a31e5.tar.xz
linux-f7ca35227253dc8244fd908140b06010e67a31e5.zip
xfs: create a separate cow extent size hint for the allocator
Create a per-inode extent size allocator hint for copy-on-write. This hint is separate from the existing extent size hint so that CoW can take advantage of the fragmentation-reducing properties of extent size hints without disabling delalloc for regular writes. The extent size hint that's fed to the allocator during a copy on write operation is the greater of the cowextsize and regular extsize hint. During reflink, if we're sharing the entire source file to the entire destination file and the destination file doesn't already have a cowextsize hint, propagate the source file's cowextsize hint to the destination file. Furthermore, zero the bulkstat buffer prior to setting the fields so that we don't copy kernel memory contents into userspace. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_iomap.h')
-rw-r--r--fs/xfs/xfs_iomap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_iomap.h b/fs/xfs/xfs_iomap.h
index a16b9567e76b..6d45cf01fcff 100644
--- a/fs/xfs/xfs_iomap.h
+++ b/fs/xfs/xfs_iomap.h
@@ -31,6 +31,7 @@ int xfs_iomap_write_unwritten(struct xfs_inode *, xfs_off_t, xfs_off_t);
void xfs_bmbt_to_iomap(struct xfs_inode *, struct iomap *,
struct xfs_bmbt_irec *);
+xfs_extlen_t xfs_eof_alignment(struct xfs_inode *ip, xfs_extlen_t extsize);
extern struct iomap_ops xfs_iomap_ops;
extern struct iomap_ops xfs_xattr_iomap_ops;