Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1acc9309 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
  btrfs: fix oops when doing space balance
  Btrfs: don't panic if we get an error while balancing V2
  btrfs: add missing options displayed in mount output
parents c2d197e8 149e2d76
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -1335,6 +1335,11 @@ struct btrfs_ioctl_defrag_range_args {
 */
 */
#define BTRFS_STRING_ITEM_KEY	253
#define BTRFS_STRING_ITEM_KEY	253


/*
 * Flags for mount options.
 *
 * Note: don't forget to add new options to btrfs_show_options()
 */
#define BTRFS_MOUNT_NODATASUM		(1 << 0)
#define BTRFS_MOUNT_NODATASUM		(1 << 0)
#define BTRFS_MOUNT_NODATACOW		(1 << 1)
#define BTRFS_MOUNT_NODATACOW		(1 << 1)
#define BTRFS_MOUNT_NOBARRIER		(1 << 2)
#define BTRFS_MOUNT_NOBARRIER		(1 << 2)
+7 −5
Original line number Original line Diff line number Diff line
@@ -2678,12 +2678,14 @@ noinline int btrfs_update_inode(struct btrfs_trans_handle *trans,
	int ret;
	int ret;


	/*
	/*
	 * If root is tree root, it means this inode is used to
	 * If the inode is a free space inode, we can deadlock during commit
	 * store free space information. And these inodes are updated
	 * if we put it into the delayed code.
	 * when committing the transaction, so they needn't delaye to
	 *
	 * be updated, or deadlock will occured.
	 * The data relocation inode should also be directly updated
	 * without delay
	 */
	 */
	if (!is_free_space_inode(root, inode)) {
	if (!is_free_space_inode(root, inode)
	    && root->root_key.objectid != BTRFS_DATA_RELOC_TREE_OBJECTID) {
		ret = btrfs_delayed_update_inode(trans, root, inode);
		ret = btrfs_delayed_update_inode(trans, root, inode);
		if (!ret)
		if (!ret)
			btrfs_set_inode_last_trans(trans, inode);
			btrfs_set_inode_last_trans(trans, inode);
+6 −0
Original line number Original line Diff line number Diff line
@@ -723,6 +723,12 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
		seq_puts(seq, ",clear_cache");
		seq_puts(seq, ",clear_cache");
	if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED))
	if (btrfs_test_opt(root, USER_SUBVOL_RM_ALLOWED))
		seq_puts(seq, ",user_subvol_rm_allowed");
		seq_puts(seq, ",user_subvol_rm_allowed");
	if (btrfs_test_opt(root, ENOSPC_DEBUG))
		seq_puts(seq, ",enospc_debug");
	if (btrfs_test_opt(root, AUTO_DEFRAG))
		seq_puts(seq, ",autodefrag");
	if (btrfs_test_opt(root, INODE_MAP_CACHE))
		seq_puts(seq, ",inode_cache");
	return 0;
	return 0;
}
}


+2 −1
Original line number Original line Diff line number Diff line
@@ -2098,7 +2098,8 @@ int btrfs_balance(struct btrfs_root *dev_root)
					   chunk_root->root_key.objectid,
					   chunk_root->root_key.objectid,
					   found_key.objectid,
					   found_key.objectid,
					   found_key.offset);
					   found_key.offset);
		BUG_ON(ret && ret != -ENOSPC);
		if (ret && ret != -ENOSPC)
			goto error;
		key.offset = found_key.offset - 1;
		key.offset = found_key.offset - 1;
	}
	}
	ret = 0;
	ret = 0;