diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-10-03 09:11:43 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2016-10-05 16:26:26 -0700 |
commit | f7ca35227253dc8244fd908140b06010e67a31e5 (patch) | |
tree | 2e2731cafe2a8e8f6679d2a58eef031c1a84ffba /fs/xfs/libxfs/xfs_log_format.h | |
parent | 98cc2db5b8b2c9f38aebf54a7b03657406b6de26 (diff) | |
download | linux-stable-f7ca35227253dc8244fd908140b06010e67a31e5.tar.gz linux-stable-f7ca35227253dc8244fd908140b06010e67a31e5.tar.bz2 linux-stable-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/libxfs/xfs_log_format.h')
-rw-r--r-- | fs/xfs/libxfs/xfs_log_format.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_log_format.h b/fs/xfs/libxfs/xfs_log_format.h index 5dd7c2e8f439..364ce6fcc213 100644 --- a/fs/xfs/libxfs/xfs_log_format.h +++ b/fs/xfs/libxfs/xfs_log_format.h @@ -423,7 +423,8 @@ struct xfs_log_dinode { __uint64_t di_changecount; /* number of attribute changes */ xfs_lsn_t di_lsn; /* flush sequence */ __uint64_t di_flags2; /* more random flags */ - __uint8_t di_pad2[16]; /* more padding for future expansion */ + __uint32_t di_cowextsize; /* basic cow extent size for file */ + __uint8_t di_pad2[12]; /* more padding for future expansion */ /* fields only written to during inode creation */ xfs_ictimestamp_t di_crtime; /* time created */ |