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

Commit c5cb6a05 authored by Chris Mason's avatar Chris Mason
Browse files
parents 9be3395b 655b09fe
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -918,7 +918,8 @@ again:
							   ref->parent, bsz, 0);
							   ref->parent, bsz, 0);
				if (!eb || !extent_buffer_uptodate(eb)) {
				if (!eb || !extent_buffer_uptodate(eb)) {
					free_extent_buffer(eb);
					free_extent_buffer(eb);
					return -EIO;
					ret = -EIO;
					goto out;
				}
				}
				ret = find_extent_in_eb(eb, bytenr,
				ret = find_extent_in_eb(eb, bytenr,
							*extent_item_pos, &eie);
							*extent_item_pos, &eie);
+3 −1
Original line number Original line Diff line number Diff line
@@ -951,10 +951,12 @@ static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans,
			BUG_ON(ret); /* -ENOMEM */
			BUG_ON(ret); /* -ENOMEM */
		}
		}
		if (new_flags != 0) {
		if (new_flags != 0) {
			int level = btrfs_header_level(buf);

			ret = btrfs_set_disk_extent_flags(trans, root,
			ret = btrfs_set_disk_extent_flags(trans, root,
							  buf->start,
							  buf->start,
							  buf->len,
							  buf->len,
							  new_flags, 0);
							  new_flags, level, 0);
			if (ret)
			if (ret)
				return ret;
				return ret;
		}
		}
+4 −4
Original line number Original line Diff line number Diff line
@@ -88,12 +88,12 @@ struct btrfs_ordered_sum;
/* holds checksums of all the data extents */
/* holds checksums of all the data extents */
#define BTRFS_CSUM_TREE_OBJECTID 7ULL
#define BTRFS_CSUM_TREE_OBJECTID 7ULL


/* for storing balance parameters in the root tree */
#define BTRFS_BALANCE_OBJECTID -4ULL

/* holds quota configuration and tracking */
/* holds quota configuration and tracking */
#define BTRFS_QUOTA_TREE_OBJECTID 8ULL
#define BTRFS_QUOTA_TREE_OBJECTID 8ULL


/* for storing balance parameters in the root tree */
#define BTRFS_BALANCE_OBJECTID -4ULL

/* orhpan objectid for tracking unlinked/truncated files */
/* orhpan objectid for tracking unlinked/truncated files */
#define BTRFS_ORPHAN_OBJECTID -5ULL
#define BTRFS_ORPHAN_OBJECTID -5ULL


@@ -3075,7 +3075,7 @@ int btrfs_dec_ref(struct btrfs_trans_handle *trans, struct btrfs_root *root,
int btrfs_set_disk_extent_flags(struct btrfs_trans_handle *trans,
int btrfs_set_disk_extent_flags(struct btrfs_trans_handle *trans,
				struct btrfs_root *root,
				struct btrfs_root *root,
				u64 bytenr, u64 num_bytes, u64 flags,
				u64 bytenr, u64 num_bytes, u64 flags,
				int is_data);
				int level, int is_data);
int btrfs_free_extent(struct btrfs_trans_handle *trans,
int btrfs_free_extent(struct btrfs_trans_handle *trans,
		      struct btrfs_root *root,
		      struct btrfs_root *root,
		      u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid,
		      u64 bytenr, u64 num_bytes, u64 parent, u64 root_objectid,
+1 −0
Original line number Original line Diff line number Diff line
@@ -60,6 +60,7 @@ struct btrfs_delayed_ref_node {
struct btrfs_delayed_extent_op {
struct btrfs_delayed_extent_op {
	struct btrfs_disk_key key;
	struct btrfs_disk_key key;
	u64 flags_to_set;
	u64 flags_to_set;
	int level;
	unsigned int update_key:1;
	unsigned int update_key:1;
	unsigned int update_flags:1;
	unsigned int update_flags:1;
	unsigned int is_data:1;
	unsigned int is_data:1;
+5 −0
Original line number Original line Diff line number Diff line
@@ -313,6 +313,11 @@ int btrfs_dev_replace_start(struct btrfs_root *root,
	struct btrfs_device *tgt_device = NULL;
	struct btrfs_device *tgt_device = NULL;
	struct btrfs_device *src_device = NULL;
	struct btrfs_device *src_device = NULL;


	if (btrfs_fs_incompat(fs_info, RAID56)) {
		pr_warn("btrfs: dev_replace cannot yet handle RAID5/RAID6\n");
		return -EINVAL;
	}

	switch (args->start.cont_reading_from_srcdev_mode) {
	switch (args->start.cont_reading_from_srcdev_mode) {
	case BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_ALWAYS:
	case BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_ALWAYS:
	case BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_AVOID:
	case BTRFS_IOCTL_DEV_REPLACE_CONT_READING_FROM_SRCDEV_MODE_AVOID:
Loading