Commit 7098ba57 authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: fix REFLINK_P_MAY_UPDATE_OPTIONS



If we're doing a reflink copy of existing reflinked data, we may only
set REFLINK_P_MAY_UPDATE_OPTIONS if it was set on the reflink pointer
we're copying from.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 9caea920
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -711,7 +711,8 @@ s64 bch2_remap_range(struct bch_fs *c,
			SET_REFLINK_P_IDX(&dst_p->v, offset);

			if (reflink_p_may_update_opts_field &&
			    may_change_src_io_path_opts)
			    may_change_src_io_path_opts &&
			    REFLINK_P_MAY_UPDATE_OPTIONS(src_p.v))
				SET_REFLINK_P_MAY_UPDATE_OPTIONS(&dst_p->v, true);
		} else {
			BUG();