Loading fs/btrfs/backref.c +2 −1 Original line number Original line Diff line number Diff line Loading @@ -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); Loading fs/btrfs/ctree.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -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; } } Loading fs/btrfs/ctree.h +4 −4 Original line number Original line Diff line number Diff line Loading @@ -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 Loading Loading @@ -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, Loading fs/btrfs/delayed-ref.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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; Loading fs/btrfs/dev-replace.c +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading
fs/btrfs/backref.c +2 −1 Original line number Original line Diff line number Diff line Loading @@ -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); Loading
fs/btrfs/ctree.c +3 −1 Original line number Original line Diff line number Diff line Loading @@ -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; } } Loading
fs/btrfs/ctree.h +4 −4 Original line number Original line Diff line number Diff line Loading @@ -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 Loading Loading @@ -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, Loading
fs/btrfs/delayed-ref.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -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; Loading
fs/btrfs/dev-replace.c +5 −0 Original line number Original line Diff line number Diff line Loading @@ -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