brintos

brintos / linux-shallow public Read only

0
0
Text · 912 B · 6772eeb Raw
34 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2#ifndef _BCACHEFS_REFLINK_FORMAT_H3#define _BCACHEFS_REFLINK_FORMAT_H4 5struct bch_reflink_p {6	struct bch_val		v;7	__le64			idx;8	/*9	 * A reflink pointer might point to an indirect extent which is then10	 * later split (by copygc or rebalance). If we only pointed to part of11	 * the original indirect extent, and then one of the fragments is12	 * outside the range we point to, we'd leak a refcount: so when creating13	 * reflink pointers, we need to store pad values to remember the full14	 * range we were taking a reference on.15	 */16	__le32			front_pad;17	__le32			back_pad;18} __packed __aligned(8);19 20struct bch_reflink_v {21	struct bch_val		v;22	__le64			refcount;23	union bch_extent_entry	start[0];24	__u64			_data[];25} __packed __aligned(8);26 27struct bch_indirect_inline_data {28	struct bch_val		v;29	__le64			refcount;30	u8			data[];31};32 33#endif /* _BCACHEFS_REFLINK_FORMAT_H */34