summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-06-03 00:23:49 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2025-06-04 23:45:41 +0300
commitbfaac2c54694f72d08db5cfad0a1fce2a4c7e45e (patch)
tree381763c93d24d6db195f370c03b955f80c35e18b
parent9f2dc5f39431a17d304e5845a3f7e78905473442 (diff)
downloadlinux-bfaac2c54694f72d08db5cfad0a1fce2a4c7e45e.tar.xz
bcachefs: Add flags to subvolume_to_text()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--fs/bcachefs/subvolume.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/bcachefs/subvolume.c b/fs/bcachefs/subvolume.c
index 77ba50df2ff4..60c10365c285 100644
--- a/fs/bcachefs/subvolume.c
+++ b/fs/bcachefs/subvolume.c
@@ -255,6 +255,13 @@ void bch2_subvolume_to_text(struct printbuf *out, struct bch_fs *c,
prt_printf(out, " creation_parent %u", le32_to_cpu(s.v->creation_parent));
prt_printf(out, " fs_parent %u", le32_to_cpu(s.v->fs_path_parent));
}
+
+ if (BCH_SUBVOLUME_RO(s.v))
+ prt_printf(out, " ro");
+ if (BCH_SUBVOLUME_SNAP(s.v))
+ prt_printf(out, " snapshot");
+ if (BCH_SUBVOLUME_UNLINKED(s.v))
+ prt_printf(out, " unlinked");
}
static int subvolume_children_mod(struct btree_trans *trans, struct bpos pos, bool set)