mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
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>
This commit is contained in:
parent
98cc2db5b8
commit
f7ca352272
15 changed files with 167 additions and 20 deletions
|
@ -278,7 +278,8 @@ typedef struct xfs_bstat {
|
|||
#define bs_projid bs_projid_lo /* (previously just bs_projid) */
|
||||
__u16 bs_forkoff; /* inode fork offset in bytes */
|
||||
__u16 bs_projid_hi; /* higher part of project id */
|
||||
unsigned char bs_pad[10]; /* pad space, unused */
|
||||
unsigned char bs_pad[6]; /* pad space, unused */
|
||||
__u32 bs_cowextsize; /* cow extent size */
|
||||
__u32 bs_dmevmask; /* DMIG event mask */
|
||||
__u16 bs_dmstate; /* DMIG state info */
|
||||
__u16 bs_aextents; /* attribute number of extents */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue