Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'xfs-4.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Darrick Wong:
"I've got one more bug fix for xfs for 4.17-rc4, which caps the amount
of data we try to handle in one dedupe request so that userspace can't
livelock the kernel.

This series has been run through a full xfstests run during the week
and through a quick xfstests run against this morning's master, with
no ajor failures reported.

Summary:

- Cap the maximum length of a deduplication request at MAX_RW_COUNT/2
to avoid kernel livelock due to excessively large IO requests"

* tag 'xfs-4.17-fixes-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: cap the length of deduplication requests

+10
+10
fs/xfs/xfs_file.c
··· 880 880 struct file *dst_file, 881 881 u64 dst_loff) 882 882 { 883 + struct inode *srci = file_inode(src_file); 884 + u64 max_dedupe; 883 885 int error; 884 886 887 + /* 888 + * Since we have to read all these pages in to compare them, cut 889 + * it off at MAX_RW_COUNT/2 rounded down to the nearest block. 890 + * That means we won't do more than MAX_RW_COUNT IO per request. 891 + */ 892 + max_dedupe = (MAX_RW_COUNT >> 1) & ~(i_blocksize(srci) - 1); 893 + if (len > max_dedupe) 894 + len = max_dedupe; 885 895 error = xfs_reflink_remap_range(src_file, loff, dst_file, dst_loff, 886 896 len, true); 887 897 if (error)