Lines Matching full:snapshot

10 #include "snapshot.h"
35 struct bch_snapshot snapshot; in check_subvol() local
44 snapid = le32_to_cpu(subvol.v->snapshot); in check_subvol()
45 ret = bch2_snapshot_lookup(trans, snapid, &snapshot); in check_subvol()
106 inode.bi_snapshot = le32_to_cpu(subvol.v->snapshot); in check_subvol()
115 le32_to_cpu(subvol.v->snapshot))) { in check_subvol()
126 u32 snapshot_root = bch2_snapshot_root(c, le32_to_cpu(subvol.v->snapshot)); in check_subvol()
137 "%s: snapshot tree %u not found", __func__, snapshot_tree); in check_subvol()
144 "subvolume %llu is not set as snapshot but is not master subvolume", in check_subvol()
221 bkey_fsck_err_on(!subvol.v->snapshot, in bch2_subvolume_validate()
223 "invalid snapshot"); in bch2_subvolume_validate()
237 prt_printf(out, "root %llu snapshot id %u", in bch2_subvolume_to_text()
239 le32_to_cpu(s.v->snapshot)); in bch2_subvolume_to_text()
325 int bch2_snapshot_get_subvol(struct btree_trans *trans, u32 snapshot, in bch2_snapshot_get_subvol() argument
330 return bch2_snapshot_lookup(trans, snapshot, &snap) ?: in bch2_snapshot_get_subvol()
351 *snapid = le32_to_cpu(subvol.v->snapshot); in __bch2_subvolume_get_snapshot()
387 * Separate from the snapshot tree in the snapshots btree, we record the tree
388 * structure of how snapshot subvolumes were created - the parent subvolume of
389 * each snapshot subvolume.
408 * Delete subvolume, mark snapshot ID as deleted, queue up snapshot
426 u32 snapid = le32_to_cpu(subvol.v->snapshot); in __bch2_subvolume_delete()
428 struct bkey_s_c_snapshot snapshot = in __bch2_subvolume_delete() local
431 0, snapshot); in __bch2_subvolume_delete()
432 ret = bkey_err(snapshot); in __bch2_subvolume_delete()
434 "missing snapshot %u", snapid); in __bch2_subvolume_delete()
438 u32 treeid = le32_to_cpu(snapshot.v->tree); in __bch2_subvolume_delete()
446 "missing snapshot tree %u", treeid); in __bch2_subvolume_delete()
595 /* Creating a snapshot: */ in bch2_subvolume_create()
607 parent = le32_to_cpu(src_subvol->v.snapshot); in bch2_subvolume_create()
617 src_subvol->v.snapshot = cpu_to_le32(new_nodes[1]); in bch2_subvolume_create()
629 new_subvol->v.snapshot = cpu_to_le32(new_nodes[0]); in bch2_subvolume_create()
670 root_volume.v.snapshot = cpu_to_le32(U32_MAX); in bch2_initialize_subvolumes()