mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-07 16:17:41 -04:00
bcachefs: Log message in journal for snapshot deletion
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
@@ -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 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user