45 lines
1.3 KiB
Diff
45 lines
1.3 KiB
Diff
From dd0d1ff378c1d32a9c2ccab19b98db720657f36d Mon Sep 17 00:00:00 2001
|
|
From: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Date: Thu, 12 Dec 2024 04:00:40 -0500
|
|
Subject: [PATCH 208/233] bcachefs: Log message in journal for snapshot
|
|
deletion
|
|
Content-Type: text/plain; charset="utf-8"
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
|
|
Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
|
|
---
|
|
fs/bcachefs/snapshot.c | 16 ++++++++++++++++
|
|
1 file changed, 16 insertions(+)
|
|
|
|
diff --git a/fs/bcachefs/snapshot.c b/fs/bcachefs/snapshot.c
|
|
index f975f2cf3e35..0dafadc1bcf2 100644
|
|
--- a/fs/bcachefs/snapshot.c
|
|
+++ b/fs/bcachefs/snapshot.c
|
|
@@ -1568,6 +1568,22 @@ int bch2_delete_dead_snapshots(struct bch_fs *c)
|
|
if (!delete_leaves.nr && !delete_interior.nr)
|
|
goto err;
|
|
|
|
+ {
|
|
+ struct printbuf buf = PRINTBUF;
|
|
+ prt_printf(&buf, "deleting leaves");
|
|
+ darray_for_each(delete_leaves, i)
|
|
+ prt_printf(&buf, " %u", *i);
|
|
+
|
|
+ prt_printf(&buf, " interior");
|
|
+ darray_for_each(delete_interior, i)
|
|
+ prt_printf(&buf, " %u->%u", i->id, i->live_child);
|
|
+
|
|
+ ret = commit_do(trans, NULL, NULL, 0, bch2_trans_log_msg(trans, &buf));
|
|
+ printbuf_exit(&buf);
|
|
+ if (ret)
|
|
+ goto err;
|
|
+ }
|
|
+
|
|
for (unsigned btree = 0; btree < BTREE_ID_NR; btree++) {
|
|
struct disk_reservation res = { 0 };
|
|
|
|
--
|
|
2.45.2
|
|
|