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 'for-4.13-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:
"Fixes addressing problems reported by users, and there's one more
regression fix"

* 'for-4.13-part3' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
btrfs: round down size diff when shrinking/growing device
Btrfs: fix early ENOSPC due to delalloc
btrfs: fix lockup in find_free_extent with read-only block groups
Btrfs: fix dir item validation when replaying xattr deletes

+8 -10
+5 -6
fs/btrfs/extent-tree.c
··· 4825 4825 else 4826 4826 flush = BTRFS_RESERVE_NO_FLUSH; 4827 4827 spin_lock(&space_info->lock); 4828 - if (can_overcommit(fs_info, space_info, orig, flush, false)) { 4829 - spin_unlock(&space_info->lock); 4830 - break; 4831 - } 4832 4828 if (list_empty(&space_info->tickets) && 4833 4829 list_empty(&space_info->priority_tickets)) { 4834 4830 spin_unlock(&space_info->lock); ··· 7585 7589 u64 offset; 7586 7590 int cached; 7587 7591 7592 + /* If the block group is read-only, we can skip it entirely. */ 7593 + if (unlikely(block_group->ro)) 7594 + continue; 7595 + 7588 7596 btrfs_grab_block_group(block_group, delalloc); 7589 7597 search_start = block_group->key.objectid; 7590 7598 ··· 7623 7623 } 7624 7624 7625 7625 if (unlikely(block_group->cached == BTRFS_CACHE_ERROR)) 7626 - goto loop; 7627 - if (unlikely(block_group->ro)) 7628 7626 goto loop; 7629 7627 7630 7628 /* ··· 7837 7839 failed_alloc = false; 7838 7840 BUG_ON(index != get_block_group_index(block_group)); 7839 7841 btrfs_release_block_group(block_group, delalloc); 7842 + cond_resched(); 7840 7843 } 7841 7844 up_read(&space_info->groups_sem); 7842 7845
+1 -2
fs/btrfs/tree-log.c
··· 2153 2153 u32 this_len = sizeof(*di) + name_len + data_len; 2154 2154 char *name; 2155 2155 2156 - ret = verify_dir_item(fs_info, path->nodes[0], 2157 - path->slots[0], di); 2156 + ret = verify_dir_item(fs_info, path->nodes[0], i, di); 2158 2157 if (ret) { 2159 2158 ret = -EIO; 2160 2159 goto out;
+2 -2
fs/btrfs/volumes.c
··· 2702 2702 2703 2703 mutex_lock(&fs_info->chunk_mutex); 2704 2704 old_total = btrfs_super_total_bytes(super_copy); 2705 - diff = new_size - device->total_bytes; 2705 + diff = round_down(new_size - device->total_bytes, fs_info->sectorsize); 2706 2706 2707 2707 if (new_size <= device->total_bytes || 2708 2708 device->is_tgtdev_for_dev_replace) { ··· 4406 4406 u64 diff; 4407 4407 4408 4408 new_size = round_down(new_size, fs_info->sectorsize); 4409 - diff = old_size - new_size; 4409 + diff = round_down(old_size - new_size, fs_info->sectorsize); 4410 4410 4411 4411 if (device->is_tgtdev_for_dev_replace) 4412 4412 return -EINVAL;