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 git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable

* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: Spelling fix in btrfs_lookup_first_block_group comments
Btrfs: make show_options result match actual option names
Btrfs: remove outdated comment in btrfs_ioctl_resize()
Btrfs: remove some WARN_ONs in the IO failure path
Btrfs: Don't loop forever on metadata IO failures
Btrfs: init inode ordered_data_close flag properly

+40 -13
+36 -3
fs/btrfs/ctree.c
··· 1469 1469 u32 blocksize; 1470 1470 struct extent_buffer *b = *eb_ret; 1471 1471 struct extent_buffer *tmp; 1472 + int ret; 1472 1473 1473 1474 blocknr = btrfs_node_blockptr(b, slot); 1474 1475 gen = btrfs_node_ptr_generation(b, slot); ··· 1477 1476 1478 1477 tmp = btrfs_find_tree_block(root, blocknr, blocksize); 1479 1478 if (tmp && btrfs_buffer_uptodate(tmp, gen)) { 1479 + /* 1480 + * we found an up to date block without sleeping, return 1481 + * right away 1482 + */ 1480 1483 *eb_ret = tmp; 1481 1484 return 0; 1482 1485 } ··· 1488 1483 /* 1489 1484 * reduce lock contention at high levels 1490 1485 * of the btree by dropping locks before 1491 - * we read. 1486 + * we read. Don't release the lock on the current 1487 + * level because we need to walk this node to figure 1488 + * out which blocks to read. 1492 1489 */ 1493 1490 btrfs_unlock_up_safe(p, level + 1); 1494 1491 btrfs_set_path_blocking(p); ··· 1501 1494 reada_for_search(root, p, level, slot, key->objectid); 1502 1495 1503 1496 btrfs_release_path(NULL, p); 1497 + 1498 + ret = -EAGAIN; 1504 1499 tmp = read_tree_block(root, blocknr, blocksize, gen); 1505 - if (tmp) 1500 + if (tmp) { 1501 + /* 1502 + * If the read above didn't mark this buffer up to date, 1503 + * it will never end up being up to date. Set ret to EIO now 1504 + * and give up so that our caller doesn't loop forever 1505 + * on our EAGAINs. 1506 + */ 1507 + if (!btrfs_buffer_uptodate(tmp, 0)) 1508 + ret = -EIO; 1506 1509 free_extent_buffer(tmp); 1507 - return -EAGAIN; 1510 + } 1511 + return ret; 1508 1512 } 1509 1513 1510 1514 /* ··· 1714 1696 if (ret == -EAGAIN) 1715 1697 goto again; 1716 1698 1699 + if (ret == -EIO) 1700 + goto done; 1701 + 1717 1702 if (!p->skip_locking) { 1718 1703 int lret; 1719 1704 ··· 1759 1738 */ 1760 1739 if (!p->leave_spinning) 1761 1740 btrfs_set_path_blocking(p); 1741 + if (ret < 0) 1742 + btrfs_release_path(root, p); 1762 1743 return ret; 1763 1744 } 1764 1745 ··· 4235 4212 if (ret == -EAGAIN) 4236 4213 goto again; 4237 4214 4215 + if (ret < 0) { 4216 + btrfs_release_path(root, path); 4217 + goto done; 4218 + } 4219 + 4238 4220 if (!path->skip_locking) { 4239 4221 ret = btrfs_try_spin_lock(next); 4240 4222 if (!ret) { ··· 4273 4245 0, &key); 4274 4246 if (ret == -EAGAIN) 4275 4247 goto again; 4248 + 4249 + if (ret < 0) { 4250 + btrfs_release_path(root, path); 4251 + goto done; 4252 + } 4276 4253 4277 4254 if (!path->skip_locking) { 4278 4255 btrfs_assert_tree_locked(path->nodes[level]);
-2
fs/btrfs/disk-io.c
··· 848 848 849 849 if (ret == 0) 850 850 set_bit(EXTENT_BUFFER_UPTODATE, &buf->bflags); 851 - else 852 - WARN_ON(1); 853 851 return buf; 854 852 855 853 }
+1 -1
fs/btrfs/extent-tree.c
··· 312 312 } 313 313 314 314 /* 315 - * return the block group that contains teh given bytenr 315 + * return the block group that contains the given bytenr 316 316 */ 317 317 struct btrfs_block_group_cache *btrfs_lookup_block_group( 318 318 struct btrfs_fs_info *info,
+1 -1
fs/btrfs/inode.c
··· 3122 3122 bi->flags = 0; 3123 3123 bi->index_cnt = (u64)-1; 3124 3124 bi->last_unlink_trans = 0; 3125 + bi->ordered_data_close = 0; 3125 3126 extent_map_tree_init(&BTRFS_I(inode)->extent_tree, GFP_NOFS); 3126 3127 extent_io_tree_init(&BTRFS_I(inode)->io_tree, 3127 3128 inode->i_mapping, GFP_NOFS); ··· 4296 4295 } 4297 4296 if (err) { 4298 4297 free_extent_map(em); 4299 - WARN_ON(1); 4300 4298 return ERR_PTR(err); 4301 4299 } 4302 4300 return em;
-4
fs/btrfs/ioctl.c
··· 437 437 return 0; 438 438 } 439 439 440 - /* 441 - * Called inside transaction, so use GFP_NOFS 442 - */ 443 - 444 440 static int btrfs_ioctl_resize(struct btrfs_root *root, void __user *arg) 445 441 { 446 442 u64 new_size;
+2 -2
fs/btrfs/super.c
··· 436 436 if (btrfs_test_opt(root, SSD)) 437 437 seq_puts(seq, ",ssd"); 438 438 if (btrfs_test_opt(root, NOTREELOG)) 439 - seq_puts(seq, ",no-treelog"); 439 + seq_puts(seq, ",notreelog"); 440 440 if (btrfs_test_opt(root, FLUSHONCOMMIT)) 441 - seq_puts(seq, ",flush-on-commit"); 441 + seq_puts(seq, ",flushoncommit"); 442 442 if (!(root->fs_info->sb->s_flags & MS_POSIXACL)) 443 443 seq_puts(seq, ",noacl"); 444 444 return 0;