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 branch 'btrfs-3.0' of git://github.com/chrismason/linux

* 'btrfs-3.0' of git://github.com/chrismason/linux:
Btrfs: make sure not to defrag extents past i_size
Btrfs: fix recursive auto-defrag

+10 -1
+10 -1
fs/btrfs/ioctl.c
··· 1047 1047 if (!max_to_defrag) 1048 1048 max_to_defrag = last_index - 1; 1049 1049 1050 - while (i <= last_index && defrag_count < max_to_defrag) { 1050 + /* 1051 + * make writeback starts from i, so the defrag range can be 1052 + * written sequentially. 1053 + */ 1054 + if (i < inode->i_mapping->writeback_index) 1055 + inode->i_mapping->writeback_index = i; 1056 + 1057 + while (i <= last_index && defrag_count < max_to_defrag && 1058 + (i < (i_size_read(inode) + PAGE_CACHE_SIZE - 1) >> 1059 + PAGE_CACHE_SHIFT)) { 1051 1060 /* 1052 1061 * make sure we stop running if someone unmounts 1053 1062 * the FS